From 0b795e5b369ff74579464495b448c6f2d2d7c869 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 23 Apr 2011 15:41:38 -0700 Subject: [PATCH] Minor code simplification. --- Lib/collections.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Lib/collections.py b/Lib/collections.py index f2ae8ea5c1d..321daa394ec 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -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)