From: Berker Peksag Date: Wed, 1 Jun 2016 20:54:33 +0000 (-0700) Subject: Fix link in programming FAQ. X-Git-Tag: v3.5.2rc1~91 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b6a14d1cbc66b6a60ba695b519c210155a35adc;p=thirdparty%2FPython%2Fcpython.git Fix link in programming FAQ. The example actually uses the sort method of list object. --- diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst index 8157124cda42..b2ad7a7cc400 100644 --- a/Doc/faq/programming.rst +++ b/Doc/faq/programming.rst @@ -1312,7 +1312,7 @@ I want to do a complicated sort: can you do a Schwartzian Transform in Python? The technique, attributed to Randal Schwartz of the Perl community, sorts the elements of a list by a metric which maps each element to its "sort value". In -Python, use the ``key`` argument for the :func:`sort()` function:: +Python, use the ``key`` argument for the :meth:`list.sort` method:: Isorted = L[:] Isorted.sort(key=lambda s: int(s[10:15]))