Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5b6a14d

Browse files
committed
Fix link in programming FAQ.
The example actually uses the sort method of list object.
1 parent 93818c7 commit 5b6a14d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/faq/programming.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,7 @@ I want to do a complicated sort: can you do a Schwartzian Transform in Python?
13121312

13131313
The technique, attributed to Randal Schwartz of the Perl community, sorts the
13141314
elements of a list by a metric which maps each element to its "sort value". In
1315-
Python, use the ``key`` argument for the :func:`sort()` function::
1315+
Python, use the ``key`` argument for the :meth:`list.sort` method::
13161316

13171317
Isorted = L[:]
13181318
Isorted.sort(key=lambda s: int(s[10:15]))

0 commit comments

Comments
 (0)