ruamel.orderddict a C implementation of Foord/Larosa's odict and superset of standard library OrderedDict
Anthon van der Neut
a.van.der.neut at ruamel.eu
Wed Aug 26 00:35:47 CEST 2015
After once again multiple (this time only three) years, I am happy to
announce version 0.4.9 of ruamel.orderddict.
Main enhancement since the original release in 2007 is the addition of
the viewkeys/viewitems/viewvalues methods as added to the dictionaries
in Python 2.7
The package can be installed from PyPI, and wheels are available for
Sources are hosted on bitbucket.
>From the blurb on ruamel.ordereddict home-page:
This is an implementation of an ordered dictionary with Key Insertion
Order (KIO: updates of values do not affect the position of the key),
Key Value Insertion Order (KVIO, an existing key's position is removed
and put at the back).
Sorted dictionaries are also provided. Currently only with Key Sorted
Order (KSO, no sorting function can be specified, but a transform
function to be applied on the key before comparison can be supplied).
It implementation is directly derived from dictobject.c and its speed is
5-10% slower than dict() and 5-9 times faster than Larosa/Foord
excellent pure Python implemention. With a little helper wrapper
(because of incompatibilities in the more recently implemented
OrderedDict in the standard library), ruamel.ordereddict will also pass
all unittests for OrderedDict.
More information about the Python-announce-list