Why are there no ordered dictionaries?

Christoph Zwerschke cito at online.de
Tue Nov 22 14:45:00 EST 2005


Magnus Lycka schrieb:
>> 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. 

> Sure. Others think so too. The problem is that if you and these other
> people actually write down exactly how this unambigous ordered dict
> should behave, you'll end up with a dozen different sets of semantics,
> which can be divided in at least three main groups.

That's the point where I dare to disagree. As I have pointed out in 
another posting in this thread, all other implementations have the same 
semantics for the basic behavior. I cannot see three different groups.

Again, what's so surprising as the "natural" semantics described here:
http://mail.python.org/pipermail/python-dev/2005-March/052041.html

-- Christoph



More information about the Python-list mailing list