summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-03-23 13:34:19 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-03-23 13:34:19 (GMT)
commit325dc887caa15534309f4b7c419fadcd0bb1be7d (patch)
treee91b09990d10a29566b02e0722a301ad0c456859
parent9b862b9d6679ed0de6dfeba158b417d79d4d6ed1 (diff)
downloadcpython-325dc887caa15534309f4b7c419fadcd0bb1be7d.zip
cpython-325dc887caa15534309f4b7c419fadcd0bb1be7d.tar.gz
cpython-325dc887caa15534309f4b7c419fadcd0bb1be7d.tar.bz2
Backport improved dict comparison logic
-rw-r--r--Lib/collections/__init__.py3
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)