[Python-Dev] The current dict is not an "OrderedDict"

2017年11月07日 05:51:46 -0800

This is just a reminder that the current dict is not an "OrderedDict":
>>> from collections import OrderedDict
>>> OrderedDict(a=0, b=1) == OrderedDict(b=1, a=0)
False
>>> dict(a=0, b=1) == dict(b=1, a=0)
True
The recent proposal was primarily about guaranteeing the insertion order of
dict literals.
If further guarantees are proposed, perhaps it would be a good idea to
open a new thread and state what exactly is being proposed.
Stefan Krah
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to