diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-06-01 13:54:33 -0700 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-06-01 13:54:33 -0700 |
commit | 15f362669e381a54ed8589fcd6093bda1827280d (patch) | |
tree | ef1f91b0fbfebef65ed7fb71a7108bb53e0bad79 | |
parent | 6118f037d5aae37902e5864ff262776a0b178aca (diff) | |
download | cpython-15f362669e381a54ed8589fcd6093bda1827280d.tar.gz |
Fix link in programming FAQ.
The example actually uses the sort method of list object.
-rw-r--r-- | Doc/faq/programming.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst index 8157124cda..b2ad7a7cc4 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])) |