mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Improve OrderedDict equality test.
This commit is contained in:
parent
70b224d8d4
commit
527507d72e
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue