Why are there no ordered dictionaries?

Christoph Zwerschke cito at online.de
Thu Nov 24 12:47:43 EST 2005


Fuzzyman schrieb:
> d.keys() will still return a copy of the list, so d.keys()[i] will
> still be slower than d.sequence[i]

Right, I forgot that.  Bengt suggested to implement __call__ as well as 
__getitem__ and __setitem__ for keys, values and items.

In this case, you could very effectively access it as d.values[i].

-- Christoph



More information about the Python-list mailing list