diff options
| author | Andrew M. Kuchling <amk@amk.ca> | 2008-04-15 13:10:07 +0000 |
|---|---|---|
| committer | Andrew M. Kuchling <amk@amk.ca> | 2008-04-15 13:10:07 +0000 |
| commit | 3822af6d3ad2a4645fa71b263396fd1dd213d639 (patch) | |
| tree | ee9d9124b37e85b238c10070f09fa95877a0eeb3 /Doc/tutorial | |
| parent | 09a1ebc9db3635e31796dc130f9dd493c8290460 (diff) | |
| download | cpython-git-3822af6d3ad2a4645fa71b263396fd1dd213d639.tar.gz | |
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/tutorial')
| -rw-r--r-- | Doc/tutorial/controlflow.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst index 420c8d9a44..61a621f416 100644 --- a/Doc/tutorial/controlflow.rst +++ b/Doc/tutorial/controlflow.rst @@ -437,6 +437,9 @@ not done, the order in which the arguments are printed is undefined. Arbitrary Argument Lists ------------------------ +.. index:: + statement: * + Finally, the least frequently used option is to specify that a function can be called with an arbitrary number of arguments. These arguments will be wrapped up in a tuple. Before the variable number of arguments, zero or more normal @@ -464,6 +467,9 @@ or tuple:: >>> range(*args) # call with arguments unpacked from a list [3, 4, 5] +.. index:: + statement: ** + In the same fashion, dictionaries can deliver keyword arguments with the ``**``\ -operator:: |
