Why are there no ordered dictionaries?

bonono at gmail.com bonono at gmail.com
Mon Nov 21 00:42:53 EST 2005


Ben Finney wrote:
> bonono at gmail.com <bonono at gmail.com> wrote:
> > [sort by] some other metadata that is not present in the data.
> > [...]
> > Of course, you may say, just put another column that represent
> > this(some reporting programs I have seen do it this way) and that is
> > an option but not the only option.
>
> It's a pretty good option, and very commonly used. It's known as the
> "Schwartzian transform", or more descriptively, the "Decorate, Sort,
> Undecorate" pattern.
>
Whether it is a good option is judged by the person implement it as he
is the one seeing the whole thing, and not some snippet(or concept) on
the usenet.




More information about the Python-list mailing list