[Python-checkins] r70538 - python/trunk/Lib/collections.py
raymond.hettinger
python-checkins at python.org
Mon Mar 23 05:42:19 CET 2009
Author: raymond.hettinger
Date: Mon Mar 23 05:42:18 2009
New Revision: 70538
Log:
Move initialization of root link to __init__.
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 05:42:18 2009
@@ -41,11 +41,12 @@
try:
self.__root
except AttributeError:
+ self.__root = _Link() # sentinel node for the doubly linked list
self.clear()
self.update(*args, **kwds)
def clear(self):
- self.__root = root = _Link() # sentinel node for the doubly linked list
+ root = self.__root
root.prev = root.next = root
self.__map = {}
dict.clear(self)
More information about the Python-checkins
mailing list