Why are there no ordered dictionaries?
cito at online.de
Tue Nov 22 19:44:57 CET 2005
> Of course ours is ordered *and* orderable ! You can explicitly alter
> the sequence attribute to change the ordering.
What I actually wanted to say is that there may be a confusion between a
"sorted dictionary" (one where the keys are automatically sorted) and an
"ordered dictionary" (where the keys are not automatically ordered, but
have a certain order that is preserved). Those who suggested that the
"sorted" function would be helpful probably thought of a "sorted
dictionary" rather than an "ordered dictionary."
More information about the Python-list