skip to navigation
skip to content

Not Logged In

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 test_dict.py 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
StableDict-0.2.zip (md5) Source 2007-08-28 11KB
  • Downloads (All Versions):
  • 32 downloads in the last day
  • 152 downloads in the last week
  • 722 downloads in the last month