[Python-checkins] Minor doc improvement (GH-10341)

Miss Islington (bot) webhook-mailer at python.org
Tue Mar 26 21:23:58 EDT 2019


https://github.com/python/cpython/commit/e16599c48ce3b99e4c3aaf0cb053cd01b50e380f
commit: e16599c48ce3b99e4c3aaf0cb053cd01b50e380f
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-03-26T18:23:54-07:00
summary:

Minor doc improvement (GH-10341)


Change "star-operator" to "* operator".
(cherry picked from commit dfd775a0b1aee51d842b20cdebd97cc52c0b32e7)

Co-authored-by: Andre Delfino <adelfino at gmail.com>

files:
M Doc/library/collections.rst
M Doc/tutorial/controlflow.rst

diff --git a/Doc/library/collections.rst b/Doc/library/collections.rst
index 1616585b654b..9f47e8978da3 100644
--- a/Doc/library/collections.rst
+++ b/Doc/library/collections.rst
@@ -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}
diff --git a/Doc/tutorial/controlflow.rst b/Doc/tutorial/controlflow.rst
index 905734539c68..abf163d232c5 100644
--- a/Doc/tutorial/controlflow.rst
+++ b/Doc/tutorial/controlflow.rst
@@ -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=' ')



More information about the Python-checkins mailing list