Why are there no ordered dictionaries?
Fuzzyman
fuzzyman at gmail.com
Thu Dec 1 07:01:16 EST 2005
> The semantics of assigning slices
> to d.keys[i:j] and d.values[i:j] are kind of tricky when the size changes
> and/or key names match or don't match in various ways, or the incoming
> data represents collapsing redundant keys that are legal sequential assignment
> overrides but change the size, etc.
>
I have come against the same problem with slice assignment, when doing
odict. :-)
Allowing the size to change prevents a useful optimisation - but I
dislike *preventing* programmers from doing things.
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
>
> Regards,
> Bengt Richter
More information about the Python-list
mailing list