skip to navigation
skip to content

StableDict 0.2

A dict subclass which remembers insertion order

A dictionary class remembering insertion order.

Order (i.e. the sequence) of insertions is remembered (internally stored in a hidden list attribute) and replayed when iterating. A StableDict does NOT sort or organize the keys in any other way.

Implemented as a subclass of the built in dict type. Very compact implementation (less than 150 lines of code). Comes with a large test suite derived from Python’s in a separate test module.

Obsoleted since Python 2.7 by collections.OrderedDict (PEP 372).

File Type Py Version Uploaded on Size
StableDict-0.2-py2.4.egg (md5) Python Egg 2.4 2007-08-28 18KB
StableDict-0.2-py2.5.egg (md5) Python Egg 2.5 2007-08-28 18KB
StableDict-0.2-py2.6.egg (md5) Python Egg 2.6 2009-07-11 18KB (md5) Source 2007-08-28 11KB