diff options
author | Raymond Hettinger <python@rcn.com> | 2013-03-23 13:34:19 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-03-23 13:34:19 (GMT) |
commit | 325dc887caa15534309f4b7c419fadcd0bb1be7d (patch) | |
tree | e91b09990d10a29566b02e0722a301ad0c456859 | |
parent | 9b862b9d6679ed0de6dfeba158b417d79d4d6ed1 (diff) | |
download | cpython-325dc887caa15534309f4b7c419fadcd0bb1be7d.zip cpython-325dc887caa15534309f4b7c419fadcd0bb1be7d.tar.gz cpython-325dc887caa15534309f4b7c419fadcd0bb1be7d.tar.bz2 |
Backport improved dict comparison logic
-rw-r--r-- | Lib/collections/__init__.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py index 2dcc395..707c53b 100644 --- a/Lib/collections/__init__.py +++ b/Lib/collections/__init__.py @@ -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) |