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 steven.daprano
Recipients mcarans, rhettinger, serhiy.storchaka, steven.daprano, terry.reedy
Date 2021-09-04.05:24:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20210904052221.GA26999@ando.pearwood.info>
In-reply-to <1630695420.71.0.301173157149.issue45093@roundup.psfhosted.org>
Content
> Another case is in round trip processing of JSON or YML.

Sorry for my ignorance, but I don't see how or why an unordered 
comparison would help you with round-tripping JSON or YAML.

The order of key:value pairs in JSON is not guaranteed to be preserved, 
so if you round-trip a dict to JSON back to a dict, and then use an 
ordered comparison, you might wrongly think that they are unequal.

(I think that Python's JSON does preserve order, by default. But other 
JSON encoders might not.)

> Other cases are where you would prefer an OrderedDict over a dict. 

Then use an OrderedDict.
History
Date User Action Args
2021-09-04 05:24:13steven.dapranosetrecipients: + steven.daprano, rhettinger, terry.reedy, serhiy.storchaka, mcarans
2021-09-04 05:24:13steven.dapranolinkissue45093 messages
2021-09-04 05:24:13steven.dapranocreate