]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Minor doc improvement (GH-10341)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 27 Mar 2019 01:23:54 +0000 (18:23 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Mar 2019 01:23:54 +0000 (18:23 -0700)
Change "star-operator" to "* operator".
(cherry picked from commit dfd775a0b1aee51d842b20cdebd97cc52c0b32e7)

Co-authored-by: Andre Delfino <adelfino@gmail.com>
Doc/library/collections.rst
Doc/tutorial/controlflow.rst

index 1616585b654b6072d6ac872dfffa8e14ef2a4af8..9f47e8978da3527c0bac38a44d4dfec06708e389 100644 (file)
@@ -959,7 +959,7 @@ function:
     >>> getattr(p, 'x')
     11
 
-To convert a dictionary to a named tuple, use the double-star-operator
+To convert a dictionary to a named tuple, use the ``**`` operator
 (as described in :ref:`tut-unpacking-arguments`):
 
     >>> d = {'x': 11, 'y': 22}
index 905734539c685171f51f212dd08154c856e02293..abf163d232c513357edaae39c482e6fc9f91d7db 100644 (file)
@@ -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=' ')