Specialized dictionary type structures.
An ordered dictionary.
This is a dictionary that keeps the keys in order. The default order is the insertion order. The current order can be changed at any time.
The ODict can be initialized with a Python dict or another ODict object. If a plain Python dict is used, the resulting order is undefined.
Create a new ODict instance.
ODict objects have the following methods:
Add a dictionary to the ODict object.
The new keys will be appended to the existing, but the order of the added keys is undetemined if data is a dict object. If data is an ODict its order will be respected..
Set the order of the keys.
keys should be a list containing exactly all the keys from self.
A named item list.
A KeyedList is a list of lists or tuples. Each item (sublist or tuple) should at least have 2 elements: the first one is used as a key to identify the item, but is also part of the information (value) of the item.
Create a new KeyedList, possibly filling it with data.
data should be a list of tuples/lists each having at least 2 elements. The (string value of the) first is used as the key.
KeyedList objects have the following methods:
Functions defined in the module odict