skip to navigation
skip to content

Not Logged In

Ordered Dictionary 0.2.2

A well implemented ordered dictionary with documentation (online) and tests.

The ordered dictionary is a dictionary-like object (actually a subclass of the normal dictionary data type) that keeps keys in insertion order.

This means it has all the normal dictionary methods. Methods that would normally return values in an arbitrary order are now ordered.

You can specify and alter the order, through the setkeys method.

Because an ordered dictionary is something like a sequence, it also has several sequence methods. The SequenceOrderedDict allows you to act on the keys, values, and items directly - as if they were sequences. This is convenient if you want to treated your object more like a sequence than a dictionary.

It has full documentation (online) and tests.