mirror of
https://github.com/python/cpython.git
synced 2024-11-30 21:34:17 +08:00
Backport improved dict comparison logic
This commit is contained in:
parent
9b862b9d66
commit
325dc887ca
@ -228,8 +228,7 @@ class OrderedDict(dict):
|
||||
|
||||
'''
|
||||
if isinstance(other, OrderedDict):
|
||||
return len(self)==len(other) and \
|
||||
all(map(_eq, self.items(), other.items()))
|
||||
return dict.__eq__(self, other) and all(map(_eq, self, other))
|
||||
return dict.__eq__(self, other)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user