Why are there no ordered dictionaries?

Christoph Zwerschke cito at online.de
Wed Nov 23 18:18:31 EST 2005


Here is another old posting I just found which again gives the same use 
cases and semantics:

http://mail.python.org/pipermail/python-dev/2005-March/051974.html

"Keys are iterated over in the order that they are added. Setting a
value using a key that compares equal to one already in the dict
replaces the value, but not the key, and does not change the iteration
order. Removing a key (and value) then re-adding it moves the key to the
end of the iteration order."

So far all those who would like to have an ordered dict seem to have the 
same semantics in mind.



More information about the Python-list mailing list