[Python-Dev] decorate-sort-undecorate

Lars Marius Garshol larsga at garshol.priv.no
Wed Oct 15 10:19:00 EDT 2003


* Michael Chermside
| 
| I find Tim's (and other's) arguments quite convincing. We can go
| with a stable sort... ie, compare the keys, then fall back on
| stability and NEVER try comparing the objects themselves, and I
| think it will make complete sense. After all, sorting with a "key"
| parameter provided is *NOT* really a DSU algorithm... it's a new
| sort feature which happens to be _implemented_ using DSU. Should
| that new feature sort on "just the key" (leaving ties stable) or
| should it sort on "the key and then the objects themselves". I'd say
| both make sense, and in fact "just the key" is more obvious to me.

+1.

Very glad to see this being added. This has to take the prize for
utility-I-most-often-reimplement.

-- 
Lars Marius Garshol, Ontopian         <URL: http://www.ontopia.net >
GSM: +47 98 21 55 50                  <URL: http://www.garshol.priv.no >




More information about the Python-Dev mailing list