[Python-checkins] cpython (3.3): Backport improved dict comparison logic
raymond.hettinger
python-checkins at python.org
Sat Mar 23 14:36:04 CET 2013
http://hg.python.org/cpython/rev/459ce02c4823
changeset: 82901:459ce02c4823
branch: 3.3
parent: 82898:1f6cda549b85
user: Raymond Hettinger <python at rcn.com>
date: Sat Mar 23 06:34:19 2013 -0700
summary:
Backport improved dict comparison logic
files:
Lib/collections/__init__.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -228,8 +228,7 @@
'''
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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list