Why are there no ordered dictionaries?

Christoph Zwerschke cito at online.de
Tue Nov 22 15:08:32 EST 2005


>>I still believe that the concept of an "ordered dictionary" ("behave 
>>like dict, only keep the order of the keys") is intuitive and doesn't 
>>give you so much scope for ambiguity. But probably I need to work on an 
>>implementation to become more clear about possible hidden subtleties.

Bengt Richter schrieb:

> Does that mean that the Larosa/Foord odict.py implementation in PyPI
> does not do what you want?

Basically, it is what I had in mind. But I'm now seeing some things that 
could be improved/supplemented, e.g.
- performance improvements
- the internal keys list should be hidden
- list methods should be mixed in instead

-- Christoph



More information about the Python-list mailing list