Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A dict subclass which remembers insertion order

Project description

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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for StableDict, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size StableDict-0.2-py2.4.egg (19.4 kB) File type Egg Python version 2.4 Upload date Hashes View hashes
Filename, size StableDict-0.2-py2.5.egg (19.2 kB) File type Egg Python version 2.5 Upload date Hashes View hashes
Filename, size StableDict-0.2-py2.6.egg (19.1 kB) File type Egg Python version 2.6 Upload date Hashes View hashes
Filename, size StableDict-0.2.zip (11.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page