Why are there no ordered dictionaries?

Tom Anderson twic at urchin.earth.li
Fri Nov 25 14:37:01 EST 2005


On Wed, 23 Nov 2005, Christoph Zwerschke wrote:

> Alex Martelli wrote:
>
>> However, since Christoph himself just misclassified C++'s std::map as 
>> "ordered" (it would be "sorted" in this new terminology he's now 
>> introducing), it seems obvious that the terminological confusion is 
>> rife.
>
> Speaking about "ordered" and "sorted" in the context of collections is 
> not a new terminology I am introducing, but seems to be pretty common in 
> computer science

This is quite true. I haven't seen any evidence for 'rife' 
misunderstanding of these terms.

That said ...

> Perhaps Pythonists are not used to that terminology, since they use the 
> term "list" for an "ordered collection". An ordered dictionary is a 
> dictionary whose keys are a (unique) list. Sometimes it is also called a 
> "sequence"

Maybe we should call it a 'sequenced dictionary' to fit better with 
pythonic terminology?

tom

-- 
YOU HAVE NO CHANCE TO ARRIVE MAKE ALTERNATIVE TRAVEL ARRANGEMENTS. --
Robin May



More information about the Python-list mailing list