diff options
author | Raymond Hettinger <python@rcn.com> | 2009-03-23 18:29:11 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-03-23 18:29:11 (GMT) |
commit | 798ee1a4c6d60a2e497f91357aafba988bd28ba7 (patch) | |
tree | 749e63313335056ac1bc495ded6e00db97250191 /Lib/collections.py | |
parent | f173654db89ef5a74fd631c3cb996f9d84ce1d1b (diff) | |
download | cpython-798ee1a4c6d60a2e497f91357aafba988bd28ba7.zip cpython-798ee1a4c6d60a2e497f91357aafba988bd28ba7.tar.gz cpython-798ee1a4c6d60a2e497f91357aafba988bd28ba7.tar.bz2 |
Make imported name private and wrap long-line.
Diffstat (limited to 'Lib/collections.py')
-rw-r--r-- | Lib/collections.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/collections.py b/Lib/collections.py index eaecd96..4f3f726 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -11,7 +11,7 @@ from operator import itemgetter as _itemgetter from keyword import iskeyword as _iskeyword import sys as _sys import heapq as _heapq -from weakref import proxy +from weakref import proxy as _proxy from itertools import repeat as _repeat, chain as _chain, starmap as _starmap ################################################################################ @@ -59,7 +59,7 @@ class OrderedDict(dict, MutableMapping): root = self.__root last = root.prev link.prev, link.next, link.key = last, root, key - last.next = root.prev = proxy(link) + last.next = root.prev = _proxy(link) dict.__setitem__(self, key, value) def __delitem__(self, key): @@ -127,7 +127,8 @@ class OrderedDict(dict, MutableMapping): def __eq__(self, other): if isinstance(other, OrderedDict): - return len(self)==len(other) and all(p==q for p, q in zip(self.items(), other.items())) + return len(self)==len(other) and \ + all(p==q for p, q in zip(self.items(), other.items())) return dict.__eq__(self, other) |