summaryrefslogtreecommitdiffstats
path: root/Lib/collections.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/collections.py')
-rw-r--r--Lib/collections.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/collections.py b/Lib/collections.py
index 2c2355e..f0f1fbb 100644
--- a/Lib/collections.py
+++ b/Lib/collections.py
@@ -41,11 +41,12 @@ class OrderedDict(dict, MutableMapping):
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)