mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +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):
|
if isinstance(other, OrderedDict):
|
||||||
return len(self)==len(other) and \
|
return dict.__eq__(self, other) and all(map(_eq, self, other))
|
||||||
all(map(_eq, self.items(), other.items()))
|
|
||||||
return dict.__eq__(self, other)
|
return dict.__eq__(self, other)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue