File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -971,7 +971,7 @@ function:
971
971
>>> getattr (p, ' x' )
972
972
11
973
973
974
- To convert a dictionary to a named tuple, use the double-star- operator
974
+ To convert a dictionary to a named tuple, use the `` ** `` operator
975
975
(as described in :ref: `tut-unpacking-arguments `):
976
976
977
977
>>> d = {' x' : 11 , ' y' : 22 }
Original file line number Diff line number Diff line change @@ -560,7 +560,7 @@ The reverse situation occurs when the arguments are already in a list or tuple
560
560
but need to be unpacked for a function call requiring separate positional
561
561
arguments. For instance, the built-in :func: `range ` function expects separate
562
562
*start * and *stop * arguments. If they are not available separately, write the
563
- function call with the ``* ``\ - operator to unpack the arguments out of a list
563
+ function call with the ``* `` operator to unpack the arguments out of a list
564
564
or tuple::
565
565
566
566
>>> list(range(3, 6)) # normal call with separate arguments
@@ -573,7 +573,7 @@ or tuple::
573
573
single: **; in function calls
574
574
575
575
In the same fashion, dictionaries can deliver keyword arguments with the
576
- ``** ``\ - operator::
576
+ ``** `` operator::
577
577
578
578
>>> def parrot(voltage, state='a stiff', action='voom'):
579
579
... print("-- This parrot wouldn't", action, end=' ')
You can’t perform that action at this time.
0 commit comments