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/2008-February/076847.html below:

[Python-Dev] Mutable sequence .sort() signature

[Python-Dev] Mutable sequence .sort() signature [Python-Dev] Mutable sequence .sort() signatureGuido van Rossum guido at python.org
Wed Feb 13 21:14:33 CET 2008
On Feb 13, 2008 12:09 PM, Daniel Stutzbach
<daniel at stutzbachenterprises.com> wrote:
> Without the cmp argument, what's the concise way to spell something like
> "sort a list of floats by absolute value"?  It'd be nice to have a stock
> example to help users rewrite their code to work with 3.0.

L.sort(key=abs)

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
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