[Python-Dev] decorate-sort-undecorate
Neil Schemenauer
nas-python at python.ca
Tue Oct 14 11:27:52 EDT 2003
More information about the Python-Dev mailing list
Tue Oct 14 11:27:52 EDT 2003
- Previous message: [Python-Dev] decorate-sort-undecorate
- Next message: [Python-Dev] decorate-sort-undecorate
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Oct 13, 2003 at 08:31:58PM -0700, Guido van Rossum wrote: > But using Raymond's proposal, you can do that by specifying a tuple > consisting of zipcode and name as the key, as follows: > > myTable.sort(key = lambda rec: (rec.zipcode, rec.name)) This reads nicely. +1 on 'key'. Neil
- Previous message: [Python-Dev] decorate-sort-undecorate
- Next message: [Python-Dev] decorate-sort-undecorate
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list