summaryrefslogtreecommitdiffstats
path: root/Lib/collections
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2012-06-10 05:51:39 (GMT)
committerRaymond Hettinger <python@rcn.com>2012-06-10 05:51:39 (GMT)
commit1c2018c311351ff90b0c278f289291822bcd1e83 (patch)
tree95acd18f34d69359573ad04ab63699f1728de87d /Lib/collections
parent7929cfb18c54652133100f3209d5a6496f659ef1 (diff)
downloadcpython-1c2018c311351ff90b0c278f289291822bcd1e83.zip
cpython-1c2018c311351ff90b0c278f289291822bcd1e83.tar.gz
cpython-1c2018c311351ff90b0c278f289291822bcd1e83.tar.bz2
Small cleanup and optimization
Diffstat (limited to 'Lib/collections')
-rw-r--r--Lib/collections/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/collections/__init__.py b/Lib/collections/__init__.py
index 355c0c1..e5f9599 100644
--- a/Lib/collections/__init__.py
+++ b/Lib/collections/__init__.py
@@ -8,7 +8,7 @@ import collections.abc
__all__ += collections.abc.__all__
from _collections import deque, defaultdict
-from operator import itemgetter as _itemgetter
+from operator import itemgetter as _itemgetter, eq as _eq
from keyword import iskeyword as _iskeyword
import sys as _sys
import heapq as _heapq
@@ -229,7 +229,7 @@ class OrderedDict(dict):
'''
if isinstance(other, OrderedDict):
return len(self)==len(other) and \
- all(p==q for p, q in zip(self.items(), other.items()))
+ all(map(_eq, self.items(), other.items()))
return dict.__eq__(self, other)