Ticket #7496: datastructures.py.diff
File datastructures.py.diff, 580 bytes (added by , 16 years ago) |
---|
-
django/utils/datastructures.py
54 54 """ 55 55 A dictionary that keeps its keys in the order in which they're inserted. 56 56 """ 57 def __new__(cls, *args, **kwargs): 58 instance = super(SortedDict, cls).__new__(cls, *args, **kwargs) 59 instance.keyOrder = [] 60 return instance 61 57 62 def __init__(self, data=None): 58 63 if data is None: 59 64 data = {}