pds4_tools.extern.ordered_dict module

class OrderedDict(*args, **kwds)[source]

Bases: dict

Dictionary that remembers insertion order, for Python 2.6 and below

Code from: http://code.activestate.com/recipes/576693/ An inherited dict maps keys to values. The inherited dict provides __getitem__, __len__, __contains__, and get. The remaining methods are order-aware. Big-O running times for all methods are the same as for regular dictionaries.

The internal self.__map dictionary maps keys to links in a doubly linked list. The circular doubly linked list starts and ends with a sentinel element. The sentinel element never gets deleted (this simplifies the algorithm). Each link is stored as a list of length three: [PREV, NEXT, KEY].

clear()[source]
popitem(last=True)[source]
keys()[source]
values()[source]
items()[source]
iterkeys()[source]
itervalues()[source]
iteritems()[source]
update(*args, **kwds)[source]
pop(key, default=<object object at 0x000000000402C720>)[source]
setdefault(key, default=None)[source]
copy()[source]
classmethod fromkeys(iterable, value=None)[source]
viewkeys()[source]
viewvalues()[source]
viewitems()[source]