mirror of https://github.com/python/cpython
Improve OrderedDict equality test.
This commit is contained in:
parent
70b224d8d4
commit
527507d72e
|
@ -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