Why are there no ordered dictionaries?

Steve Holden steve at holdenweb.com
Wed Nov 23 03:06:11 EST 2005


Christoph Zwerschke wrote:
> This is probably a FAQ, but I dare to ask it nevertheless since I 
> haven't found a satisfying answer yet: Why isn't there an "ordered 
> dictionary" class at least in the standard list? Time and again I am 
> missing that feature. Maybe there is something wrong with my programming 
> style, but I rather think it is generally useful.
> 
> I fully agree with the following posting where somebody complains why so 
> very basic and useful things are not part of the standard library:
> http://groups.google.com/group/comp.lang.python/msg/e652d2f771a49857
> 
> Are there plans to get it into the standard lib sometime?
> 
We're always encouraging new posters to use "good" subject lines. 
Several hundred posts after your original question I think everyone can 
agree that this was a *very* good subject line :-)

Perhaps now the answer top your question is more obvious: there is by no 
means universal agreement on what an "ordered dictionary" should do. 
Given the ease with which Python allows you to implement your chosen 
functionality it would be presumptuous of the core developers to favour 
any one of the several reasonable alternatives that might be chosen.

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/




More information about the Python-list mailing list