Backport improved dict comparison logic

This commit is contained in:
Raymond Hettinger 2013-03-23 06:34:19 -07:00
parent 9b862b9d66
commit 325dc887ca

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)