[issue43691] Comparison of OrderedDict() and dict()

2021-04-01 Thread Марк Коренберг
Марк Коренберг added the comment: Shame on me. You are right. -- resolution: -> wont fix status: open -> closed ___ Python tracker ___

[issue43691] Comparison of OrderedDict() and dict()

2021-04-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: > There are no specifications regarding the question. >From the OrderedDict docs: """ Equality tests between OrderedDict objects are order-sensitive and are implemented as list(od1.items())==list(od2.items()). Equality tests between OrderedDict objects a

[issue43691] Comparison of OrderedDict() and dict()

2021-04-01 Thread Марк Коренберг
Марк Коренберг added the comment: https://mail.python.org/pipermail/python-ideas/2015-December/037472.html -- ___ Python tracker ___ ___

[issue43691] Comparison of OrderedDict() and dict()

2021-04-01 Thread Марк Коренберг
Марк Коренберг added the comment: I don't agree. There are no specifications regarding the question. Since anything relying on specific implementation (not specification) should not be considered as something we should support or take care of. Raising exception is the best thing since it will

[issue43691] Comparison of OrderedDict() and dict()

2021-04-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Unfortunately, the existing behaviors are guaranteed and cannot be changing without breaking code — the OrderedDict class was designed to be mostly substitutable for regular dicts in existing code. Personally, I think it would have been better if OrderedDi

[issue43691] Comparison of OrderedDict() and dict()

2021-04-01 Thread Марк Коренберг
New submission from Марк Коренберг : OrderedDict([(1,2), (3,4)]) == OrderedDict([(3,4), (1,2)]) Out[1]: False# OK dict([(1,2), (3,4)]) == dict([(3,4), (1,2)]) Out[2]: True # OK dict([(1,2), (3,4)]) == OrderedDict([(3,4), (1,2)]) Out[3]: True # NOT OK, since actual order is different