sorting a dictionary

news mig at
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.


"Greg Ewing (using" <me at> wrote in message
news:b347bf$1homrr$1 at
> 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