Minor code simplification.

This commit is contained in:
Raymond Hettinger 2011-04-23 15:41:38 -07:00
parent 7ce6d9763c
commit 0b795e5b36
1 changed files with 2 additions and 4 deletions

View File

@ -45,10 +45,8 @@ class OrderedDict(dict):
try:
self.__root
except AttributeError:
self.__root = root = [None, None, None] # sentinel node
PREV = 0
NEXT = 1
root[PREV] = root[NEXT] = root
self.__root = root = [] # sentinel node
root[:] = [root, root, None]
self.__map = {}
self.__update(*args, **kwds)