[Tutor] Sorting a list of objects on different fields

Terry Carroll carroll at tjc.com
Thu Mar 2 22:52:30 CET 2006


On Thu, 2 Mar 2006, Terry Carroll wrote:

> Thanks, Kent!  I didn't know about "key=".  I see it's new in 2.4.
> I was thinking I'd have to put in a method for each potentially sortable 
> field.

And, in the spirit of RTFM, I should have been looking here first:

   http://wiki.python.org/moin/HowTo/Sorting

Embarrassingly, it's the first Google hit on "python sort".



More information about the Tutor mailing list