diff --git a/Doc/glossary.rst b/Doc/glossary.rst --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -41,7 +41,7 @@ argument A value passed to a :term:`function` (or :term:`method`) when calling the - function. There are two types of arguments: + function. There are two kinds of argument: * :dfn:`keyword argument`: an argument preceded by an identifier (e.g. ``name=``) in a function call or passed as a value in a dictionary @@ -595,7 +595,7 @@ parameter A named entity in a :term:`function` (or method) definition that specifies an :term:`argument` (or in some cases, arguments) that the - function can accept. There are five types of parameters: + function can accept. There are five kinds of parameter: * :dfn:`positional-or-keyword`: specifies an argument that can be passed either :term:`positionally ` or as a :term:`keyword argument diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1149,6 +1149,8 @@ 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: + *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