Michael Rans added the comment:
Thanks for all your help and advice.
--
___
Python tracker
<https://bugs.python.org/issue45093>
___
___
Python-bugs-list mailin
Michael Rans added the comment:
Thank you. Another case is in round trip processing of JSON or YML. Other cases
are where you would prefer an OrderedDict over a dict.
I think the method would help clarify things because it would make it obvious
that it is for ordered comparisons while
Michael Rans added the comment:
My use case is in testing. Currently I use an OrderedDict, but since dict
introduced ordering in 3.7, I was considering switching. For my test, I need to
check that the dictionary is the same both in content and order. I can indeed
use your one liner
Change by Michael Rans :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue45093>
___
___
Python-bugs-list mailing list
Unsubscrib
New submission from Michael Rans :
I suggest adding a method that allows comparing dicts taking into account the
order - an ordered compare (since == does not do that).
(Also for my other issue (https://bugs.python.org/issue45092) where I suggested
that set be ordered to reduce confusion
New submission from Michael Rans :
Now that dict is ordered, it is a bit confusing that set isn't as well. I
suggest making set ordered too.
--
messages: 400974
nosy: mcarans
priority: normal
severity: normal
status: open
title: Make set ordered like dict
type: behavior
versions