diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-12-25 22:54:44 (GMT) |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-12-25 22:54:44 (GMT) |
commit | b43099464a72ae36733cb1993771cc2b825df269 (patch) | |
tree | 79cb74ac233acf87574576282d30d79cb789f412 /Doc/reference/compound_stmts.rst | |
parent | 0b64c1415ea46b2ac7464396d5603fe5cb278870 (diff) | |
download | cpython-b43099464a72ae36733cb1993771cc2b825df269.zip cpython-b43099464a72ae36733cb1993771cc2b825df269.tar.gz cpython-b43099464a72ae36733cb1993771cc2b825df269.tar.bz2 |
Add additional links and index entries for "argument" and "parameter".
This adds to the work done for issue #15990 (i.e. f44b8d69e5fc and the
commits referenced there).
Diffstat (limited to 'Doc/reference/compound_stmts.rst')
-rw-r--r-- | Doc/reference/compound_stmts.rst | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst index 6889176..d0d0646 100644 --- a/Doc/reference/compound_stmts.rst +++ b/Doc/reference/compound_stmts.rst @@ -417,6 +417,9 @@ is equivalent to :: statement. +.. index:: + single: parameter; function definition + .. _function: .. _def: @@ -478,11 +481,14 @@ is equivalent to :: def func(): pass func = f1(arg)(f2(func)) -.. index:: triple: default; parameter; value +.. index:: + triple: default; parameter; value + single: argument; function definition -When one or more parameters have the form *parameter* ``=`` *expression*, the -function is said to have "default parameter values." For a parameter with a -default value, the corresponding argument may be omitted from a call, in which +When one or more :term:`parameters <parameter>` have the form *parameter* ``=`` +*expression*, the function is said to have "default parameter values." For a +parameter with a default value, the corresponding :term:`argument` may be +omitted from a call, in which case the parameter's default value is substituted. If a parameter has a default value, all following parameters up until the "``*``" must also have a default value --- this is a syntactic restriction that is not expressed by the grammar. |