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 socketpair
Recipients socketpair
Date 2021-04-01.09:42:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1617270176.28.0.957679341953.issue43691@roundup.psfhosted.org>
In-reply-to
Content
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

OrderedDict([(1,2), (3,4)]) == dict([(3,4), (1,2)])
Out[4]: True     # NOT OK, since actual orderd is different


I propose two options to fix it:

1. Return True when comparing anything with OrderedDict iff order is the same.
2. Raise TypeError when someone tries to compare OrderedDict() and dict(). # I think it's better.
History
Date User Action Args
2021-04-01 09:42:56socketpairsetrecipients: + socketpair
2021-04-01 09:42:56socketpairsetmessageid: <1617270176.28.0.957679341953.issue43691@roundup.psfhosted.org>
2021-04-01 09:42:56socketpairlinkissue43691 messages
2021-04-01 09:42:56socketpaircreate