Ticket #12632: sorted-dict.diff
File sorted-dict.diff, 638 bytes (added by , 15 years ago) |
---|
-
django/utils/datastructures.py
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index d6fc9dc..845d082 100644
a b class SortedDict(dict): 77 77 self.keyOrder = data.keys() 78 78 else: 79 79 self.keyOrder = [] 80 seen = set() 80 81 for key, value in data: 81 if key not in se lf.keyOrder:82 if key not in seen: 82 83 self.keyOrder.append(key) 84 seen.add(key) 83 85 84 86 def __deepcopy__(self, memo): 85 87 return self.__class__([(key, deepcopy(value, memo))