summaryrefslogtreecommitdiffstats
path: root/Doc/reference/compound_stmts.rst
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2008-04-15 13:10:07 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2008-04-15 13:10:07 (GMT)
commit3822af6d3ad2a4645fa71b263396fd1dd213d639 (patch)
treeee9d9124b37e85b238c10070f09fa95877a0eeb3 /Doc/reference/compound_stmts.rst
parent09a1ebc9db3635e31796dc130f9dd493c8290460 (diff)
downloadcpython-3822af6d3ad2a4645fa71b263396fd1dd213d639.zip
cpython-3822af6d3ad2a4645fa71b263396fd1dd213d639.tar.gz
cpython-3822af6d3ad2a4645fa71b263396fd1dd213d639.tar.bz2
Add *,**,@ to index, as suggested by
http://farmdev.com/thoughts/24/what-does-the-def-star-variable-or-def-asterisk-parameter-syntax-do-in-python-/ The right entry type to use isn't clear; operator seems wrong, because *,**,@ aren't being used in expressions here. I put them as 'statement'; 'syntax' might be better.
Diffstat (limited to 'Doc/reference/compound_stmts.rst')
-rw-r--r--Doc/reference/compound_stmts.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index be1d10e..b983a98 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -424,6 +424,9 @@ when the function is called.
The function definition does not execute the function body; this gets executed
only when the function is called.
+.. index::
+ statement: @
+
A function definition may be wrapped by one or more :term:`decorator` expressions.
Decorator expressions are evaluated when the function is defined, in the scope
that contains the function definition. The result must be a callable, which is
@@ -464,6 +467,10 @@ as the default, and explicitly test for it in the body of the function, e.g.::
penguin.append("property of the zoo")
return penguin
+.. index::
+ statement: *
+ statement: **
+
Function call semantics are described in more detail in section :ref:`calls`. A
function call always assigns values to all parameters mentioned in the parameter
list, either from position arguments, from keyword arguments, or from default