[Python-checkins] r70544 - python/trunk/Lib/collections.py
raymond.hettinger
python-checkins at python.org
Mon Mar 23 19:26:59 CET 2009
Author: raymond.hettinger
Date: Mon Mar 23 19:26:59 2009
New Revision: 70544
Log:
Make imported name private and wrap long-line.
Modified:
python/trunk/Lib/collections.py
Modified: python/trunk/Lib/collections.py
==============================================================================
--- python/trunk/Lib/collections.py (original)
+++ python/trunk/Lib/collections.py Mon Mar 23 19:26:59 2009
@@ -10,7 +10,7 @@
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, \
ifilter as _ifilter, imap as _imap, izip as _izip
@@ -59,7 +59,7 @@
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):
@@ -131,7 +131,8 @@
def __eq__(self, other):
if isinstance(other, OrderedDict):
- return len(self)==len(other) and all(_imap(_eq, self.items(), other.items()))
+ return len(self)==len(other) and \
+ all(_imap(_eq, self.iteritems(), other.iteritems()))
return dict.__eq__(self, other)
More information about the Python-checkins
mailing list