summaryrefslogtreecommitdiffstats
path: root/Doc/reference/compound_stmts.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/reference/compound_stmts.rst')
-rw-r--r--Doc/reference/compound_stmts.rst14
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.