diff options
author | Raymond Hettinger <python@rcn.com> | 2012-12-07 18:18:22 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2012-12-07 18:18:22 (GMT) |
commit | 527507d72ef2374ecd9f53f1a0a3c00783b73f4e (patch) | |
tree | 4339322e12fb858701f3a99d094343e71e7314c7 /Lib/collections | |
parent | 70b224d8d4b7ab1dfa249510d8d6e6e53468f75c (diff) | |
download | cpython-527507d72ef2374ecd9f53f1a0a3c00783b73f4e.zip cpython-527507d72ef2374ecd9f53f1a0a3c00783b73f4e.tar.gz cpython-527507d72ef2374ecd9f53f1a0a3c00783b73f4e.tar.bz2 |
Improve OrderedDict equality test.
Diffstat (limited to 'Lib/collections')
-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 e5f9599..53083e4 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) |