Skip to content

Commit dfd775a

Browse files
andresdelfinomerwok
authored andcommitted
Minor doc improvement (GH-10341)
Change "star-operator" to "* operator".
1 parent 484f20d commit dfd775a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Doc/library/collections.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ function:
971971
>>> getattr(p, 'x')
972972
11
973973

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
975975
(as described in :ref:`tut-unpacking-arguments`):
976976

977977
>>> d = {'x': 11, 'y': 22}

Doc/tutorial/controlflow.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ The reverse situation occurs when the arguments are already in a list or tuple
560560
but need to be unpacked for a function call requiring separate positional
561561
arguments. For instance, the built-in :func:`range` function expects separate
562562
*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
564564
or tuple::
565565

566566
>>> list(range(3, 6)) # normal call with separate arguments
@@ -573,7 +573,7 @@ or tuple::
573573
single: **; in function calls
574574
575575
In the same fashion, dictionaries can deliver keyword arguments with the
576-
``**``\ -operator::
576+
``**`` operator::
577577

578578
>>> def parrot(voltage, state='a stiff', action='voom'):
579579
... print("-- This parrot wouldn't", action, end=' ')

0 commit comments

Comments
 (0)