Skip to content

Correct some "-operator" mentions #10341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,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}
Expand Down
4 changes: 2 additions & 2 deletions Doc/tutorial/controlflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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=' ')
Expand Down