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: try:
self.__root self.__root
except AttributeError: except AttributeError:
self.__root = root = [None, None, None] # sentinel node self.__root = root = [] # sentinel node
PREV = 0 root[:] = [root, root, None]
NEXT = 1
root[PREV] = root[NEXT] = root
self.__map = {} self.__map = {}
self.__update(*args, **kwds) self.__update(*args, **kwds)