mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #18326: Clarify that list.sort's arguments are keyword-only.
Also, attempt to reduce confusion in the glossary by not saying there are different "types" of arguments and parameters.
This commit is contained in:
parent
0b1386d922
commit
e1391a0d68
3 changed files with 14 additions and 2 deletions
|
@ -1149,6 +1149,9 @@ application).
|
|||
fail, the entire sort operation will fail (and the list will likely be left
|
||||
in a partially modified state).
|
||||
|
||||
:meth:`sort` accepts two arguments that can only be passed by keyword
|
||||
(:ref:`keyword-only arguments <keyword-only_parameter>`):
|
||||
|
||||
*key* specifies a function of one argument that is used to extract a
|
||||
comparison key from each list element (for example, ``key=str.lower``).
|
||||
The key corresponding to each item in the list is calculated once and
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue