A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-October/038700.html below:

[Python-Dev] decorate-sort-undecorate

[Python-Dev] decorate-sort-undecorate [Python-Dev] decorate-sort-undecorateNeil Schemenauer nas-python at python.ca
Tue Oct 14 11:27:52 EDT 2003
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

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4