Improve OrderedDict equality test.

This commit is contained in:
Raymond Hettinger 2012-12-07 10:18:22 -08:00
parent 70b224d8d4
commit 527507d72e
1 changed files with 1 additions and 2 deletions

View File

@ -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)