Commit 325dc887 authored by Raymond Hettinger's avatar Raymond Hettinger

Backport improved dict comparison logic

parent 9b862b9d
...@@ -228,8 +228,7 @@ class OrderedDict(dict): ...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment