mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Revert "Minor doc improvement (GH-10341)" (GH-12597)
This reverts commit dfd775a0b1
.
This commit is contained in:
parent
b95a79c928
commit
fb28fcc925
2 changed files with 3 additions and 3 deletions
|
@ -560,7 +560,7 @@ The reverse situation occurs when the arguments are already in a list or tuple
|
|||
but need to be unpacked for a function call requiring separate positional
|
||||
arguments. For instance, the built-in :func:`range` function expects separate
|
||||
*start* and *stop* arguments. If they are not available separately, write the
|
||||
function call with the ``*`` operator to unpack the arguments out of a list
|
||||
function call with the ``*``\ -operator to unpack the arguments out of a list
|
||||
or tuple::
|
||||
|
||||
>>> list(range(3, 6)) # normal call with separate arguments
|
||||
|
@ -573,7 +573,7 @@ or tuple::
|
|||
single: **; in function calls
|
||||
|
||||
In the same fashion, dictionaries can deliver keyword arguments with the
|
||||
``**`` operator::
|
||||
``**``\ -operator::
|
||||
|
||||
>>> def parrot(voltage, state='a stiff', action='voom'):
|
||||
... print("-- This parrot wouldn't", action, end=' ')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue