Why are there no ordered dictionaries?

Alex Martelli aleax at mail.comcast.net
Fri Nov 25 12:29:59 EST 2005


Fuzzyman <fuzzyman at gmail.com> wrote:
   ...
> If you slice an ordered dictionary, I assume you would expect to get an
> ordered dictionary back ?

That would be helpful, yes, though there are precedents for types whose
slicing doesn't return an instance of that type (e.g. slices of an mmap
are instances of str, not of mmap, if I recall correctly), most
sliceable sequences do follow that pattern.


Alex



More information about the Python-list mailing list