sorting a dictionary

news mig at mig.com
Fri Feb 21 12:15:29 CET 2003


There's nothing to stop you creating a dictionary class of your own which
keeps it's items in sorted order (using a list of tuples or such). But this
is going to be slower and isn't really necessary.

Mark

"Greg Ewing (using news.cis.dfn.de)" <me at privacy.net> wrote in message
news:b347bf$1homrr$1 at ID-169208.news.dfncis.de...
> user at domain.invalid wrote:
> > How about creating a sorted dictionary then? That is, add elements
> > to the dictionary in the order they are supposed to be in.
> > Is that not possible?
>






More information about the Python-list mailing list