Why are there no ordered dictionaries?

bonono at gmail.com bonono at gmail.com
Mon Nov 21 01:45:23 CET 2005

Ben Finney wrote:
> Another possibility: ordered dictionaries are not needed when Python
> 2.4 has the 'sorted' builtin.
What does sorted() have anythng to do with orders like insertion order,
or some arbitary order that instead of a,b,c,d,e, I want it as e, c, b,
d, a ?

Personally, I have needs for ordered dict but I don't think it should
be in standard library though, as different situation called for
different behaviour for "ordered" and skewing my code to a standard lib
way is no good.

What I think is better is like the itertools recipe of giving example
of how one can make their own based on the needs.

More information about the Python-list mailing list