[issue45093] Add method to compare dicts accounting for order

Michael Rans report at bugs.python.org
Fri Sep 3 01:05:48 EDT 2021


Michael Rans <mcarans at yahoo.co.uk> 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, but just thought it would be useful to have a method available.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45093>
_______________________________________


More information about the Python-bugs-list mailing list