mirror of
https://github.com/python/cpython.git
synced 2025-11-11 14:44:57 +00:00
Note that the key and reverse arguments must be specified as keywords
This commit is contained in:
parent
7f73295966
commit
51b9c2472e
1 changed files with 1 additions and 3 deletions
|
|
@ -979,9 +979,7 @@ available. They are listed here in alphabetical order.
|
||||||
|
|
||||||
Return a new sorted list from the items in *iterable*.
|
Return a new sorted list from the items in *iterable*.
|
||||||
|
|
||||||
The optional arguments *key* and *reverse* have the same meaning as
|
Has two optional arguments which must be specified as keyword arguments.
|
||||||
those for the :meth:`list.sort` method (described in section
|
|
||||||
:ref:`typesseq-mutable`).
|
|
||||||
|
|
||||||
*key* specifies a function of one argument that is used to extract a comparison
|
*key* specifies a function of one argument that is used to extract a comparison
|
||||||
key from each list element: ``key=str.lower``. The default value is ``None``.
|
key from each list element: ``key=str.lower``. The default value is ``None``.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue