Schwartzian Transform (was Re: Sort)

nospam at ktgroup.co.uk nospam at ktgroup.co.uk
Thu Dec 7 10:55:06 CET 2000


"Steven D. Majewski" <sdm7g at Virginia.EDU> writes:
> This is however, a pretty ancient Python idiom, so I wonder
> about attributing it to Randall's invention. 

It's an even more ancient sorting idiom. I've just checked a textbook published
in 1975 which describes sorting just the keys instead of an entire record as an
old established technique! It even discusses why you might want to do this when
you're sorting on some function of various fields and need a stable sort.



More information about the Python-list mailing list