This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients adelfino, barry, eli.bendersky, ethan.furman, methane, pablogsal
Date 2018-06-15.04:11:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1529035887.91.0.947875510639.issue33863@psf.upfronthosting.co.za>
In-reply-to
Content
> A dictionary (treated as a synonym for dict) can't have an order different than insertion order, because that is one of the guarantees a *dictionary* provides.

When subclassing dict and overrides `__iter__` etc., the subclass is dict (isinstance(subclass, dict) is True) and it have order different than insertion order.

So when "dictionary" includes dict subclasses, it doesn't guarantee preserving insertion order.

Exact ``dict`` and ``OrderedDict`` guarantee insertion order, but when saying "dictionary", it's not guaranteed.


Anyway, word "dictionary" and "ordered dictionary" have vary meanings regarding to context.
So talking about general rule doesn't worth enough to use time and energy to discuss.  Let's focus on concrete cases.

For enum, I created pull request to change OrderedDict to dict. (PR-7698)

And for csv.DictReader, it uses OrderedDict already.  So I don't against changing "ordered dictionary" to OrderedDict.
History
Date User Action Args
2018-06-15 04:11:27methanesetrecipients: + methane, barry, eli.bendersky, ethan.furman, pablogsal, adelfino
2018-06-15 04:11:27methanesetmessageid: <1529035887.91.0.947875510639.issue33863@psf.upfronthosting.co.za>
2018-06-15 04:11:27methanelinkissue33863 messages
2018-06-15 04:11:27methanecreate