Skip to content
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

[doc] Fix erroneous backslashes in signatures and names #23658

Merged
merged 6 commits into from
Dec 17, 2020
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
36 changes: 18 additions & 18 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Creating Futures and Tasks

.. versionadded:: 3.5.2

.. method:: loop.create_task(coro, \*, name=None)
.. method:: loop.create_task(coro, *, name=None)

Schedule the execution of a :ref:`coroutine`.
Return a :class:`Task` object.
Expand Down Expand Up @@ -356,7 +356,7 @@ Opening network connections
^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. coroutinemethod:: loop.create_connection(protocol_factory, \
host=None, port=None, \*, ssl=None, \
host=None, port=None, *, ssl=None, \
family=0, proto=0, flags=0, sock=None, \
local_addr=None, server_hostname=None, \
ssl_handshake_timeout=None, \
Expand Down Expand Up @@ -482,7 +482,7 @@ Opening network connections
that can be used directly in async/await code.

.. coroutinemethod:: loop.create_datagram_endpoint(protocol_factory, \
local_addr=None, remote_addr=None, \*, \
local_addr=None, remote_addr=None, *, \
family=0, proto=0, flags=0, \
reuse_address=None, reuse_port=None, \
allow_broadcast=None, sock=None)
Expand Down Expand Up @@ -559,7 +559,7 @@ Opening network connections
Added support for Windows.

.. coroutinemethod:: loop.create_unix_connection(protocol_factory, \
path=None, \*, ssl=None, sock=None, \
path=None, *, ssl=None, sock=None, \
server_hostname=None, ssl_handshake_timeout=None)

Create a Unix connection.
Expand Down Expand Up @@ -592,7 +592,7 @@ Creating network servers
^^^^^^^^^^^^^^^^^^^^^^^^

.. coroutinemethod:: loop.create_server(protocol_factory, \
host=None, port=None, \*, \
host=None, port=None, *, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, \
sock=None, backlog=100, ssl=None, \
Expand Down Expand Up @@ -683,7 +683,7 @@ Creating network servers


.. coroutinemethod:: loop.create_unix_server(protocol_factory, path=None, \
\*, sock=None, backlog=100, ssl=None, \
*, sock=None, backlog=100, ssl=None, \
ssl_handshake_timeout=None, start_serving=True)

Similar to :meth:`loop.create_server` but works with the
Expand All @@ -708,7 +708,7 @@ Creating network servers
The *path* parameter can now be a :class:`~pathlib.Path` object.

.. coroutinemethod:: loop.connect_accepted_socket(protocol_factory, \
sock, \*, ssl=None, ssl_handshake_timeout=None)
sock, *, ssl=None, ssl_handshake_timeout=None)

Wrap an already accepted connection into a transport/protocol pair.

Expand Down Expand Up @@ -773,7 +773,7 @@ TLS Upgrade
^^^^^^^^^^^

.. coroutinemethod:: loop.start_tls(transport, protocol, \
sslcontext, \*, server_side=False, \
sslcontext, *, server_side=False, \
server_hostname=None, ssl_handshake_timeout=None)

Upgrade an existing transport-based connection to TLS.
Expand Down Expand Up @@ -806,7 +806,7 @@ TLS Upgrade
Watching file descriptors
^^^^^^^^^^^^^^^^^^^^^^^^^

.. method:: loop.add_reader(fd, callback, \*args)
.. method:: loop.add_reader(fd, callback, *args)

Start monitoring the *fd* file descriptor for read availability and
invoke *callback* with the specified arguments once *fd* is available for
Expand All @@ -816,7 +816,7 @@ Watching file descriptors

Stop monitoring the *fd* file descriptor for read availability.

.. method:: loop.add_writer(fd, callback, \*args)
.. method:: loop.add_writer(fd, callback, *args)

Start monitoring the *fd* file descriptor for write availability and
invoke *callback* with the specified arguments once *fd* is available for
Expand Down Expand Up @@ -930,7 +930,7 @@ convenient.
:meth:`loop.create_server` and :func:`start_server`.

.. coroutinemethod:: loop.sock_sendfile(sock, file, offset=0, count=None, \
\*, fallback=True)
*, fallback=True)

Send a file using high-performance :mod:`os.sendfile` if possible.
Return the total number of bytes sent.
Expand Down Expand Up @@ -964,7 +964,7 @@ convenient.
DNS
^^^

.. coroutinemethod:: loop.getaddrinfo(host, port, \*, family=0, \
.. coroutinemethod:: loop.getaddrinfo(host, port, *, family=0, \
type=0, proto=0, flags=0)

Asynchronous version of :meth:`socket.getaddrinfo`.
Expand Down Expand Up @@ -1029,7 +1029,7 @@ Working with pipes
Unix signals
^^^^^^^^^^^^

.. method:: loop.add_signal_handler(signum, callback, \*args)
.. method:: loop.add_signal_handler(signum, callback, *args)

Set *callback* as the handler for the *signum* signal.

Expand Down Expand Up @@ -1064,7 +1064,7 @@ Unix signals
Executing code in thread or process pools
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. awaitablemethod:: loop.run_in_executor(executor, func, \*args)
.. awaitablemethod:: loop.run_in_executor(executor, func, *args)

Arrange for *func* to be called in the specified executor.

Expand Down Expand Up @@ -1237,9 +1237,9 @@ async/await code consider using the high-level
subprocesses. See :ref:`Subprocess Support on Windows
<asyncio-windows-subprocess>` for details.

.. coroutinemethod:: loop.subprocess_exec(protocol_factory, \*args, \
.. coroutinemethod:: loop.subprocess_exec(protocol_factory, *args, \
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
stderr=subprocess.PIPE, \*\*kwargs)
stderr=subprocess.PIPE, **kwargs)

Create a subprocess from one or more string arguments specified by
*args*.
Expand Down Expand Up @@ -1319,9 +1319,9 @@ async/await code consider using the high-level
conforms to the :class:`asyncio.SubprocessTransport` base class and
*protocol* is an object instantiated by the *protocol_factory*.

.. coroutinemethod:: loop.subprocess_shell(protocol_factory, cmd, \*, \
.. coroutinemethod:: loop.subprocess_shell(protocol_factory, cmd, *, \
stdin=subprocess.PIPE, stdout=subprocess.PIPE, \
stderr=subprocess.PIPE, \*\*kwargs)
stderr=subprocess.PIPE, **kwargs)

Create a subprocess from *cmd*, which can be a :class:`str` or a
:class:`bytes` string encoded to the
Expand Down
6 changes: 3 additions & 3 deletions Doc/library/asyncio-future.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Future Functions
.. versionadded:: 3.5


.. function:: ensure_future(obj, \*, loop=None)
.. function:: ensure_future(obj, *, loop=None)

Return:

Expand All @@ -58,7 +58,7 @@ Future Functions
The function accepts any :term:`awaitable` object.


.. function:: wrap_future(future, \*, loop=None)
.. function:: wrap_future(future, *, loop=None)

Wrap a :class:`concurrent.futures.Future` object in a
:class:`asyncio.Future` object.
Expand All @@ -67,7 +67,7 @@ Future Functions
Future Object
=============

.. class:: Future(\*, loop=None)
.. class:: Future(*, loop=None)

A Future represents an eventual result of an asynchronous
operation. Not thread-safe.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/asyncio-policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ implementation used by the asyncio event loop:

.. class:: AbstractChildWatcher

.. method:: add_child_handler(pid, callback, \*args)
.. method:: add_child_handler(pid, callback, *args)

Register a new child handler.

Expand Down
10 changes: 5 additions & 5 deletions Doc/library/asyncio-stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The following top-level asyncio functions can be used to create
and work with streams:


.. coroutinefunction:: open_connection(host=None, port=None, \*, \
.. coroutinefunction:: open_connection(host=None, port=None, *, \
limit=None, ssl=None, family=0, proto=0, \
flags=0, sock=None, local_addr=None, \
server_hostname=None, ssl_handshake_timeout=None)
Expand All @@ -71,7 +71,7 @@ and work with streams:
The *ssl_handshake_timeout* parameter.

.. coroutinefunction:: start_server(client_connected_cb, host=None, \
port=None, \*, limit=None, \
port=None, *, limit=None, \
family=socket.AF_UNSPEC, \
flags=socket.AI_PASSIVE, sock=None, \
backlog=100, ssl=None, reuse_address=None, \
Expand Down Expand Up @@ -103,7 +103,7 @@ and work with streams:

.. rubric:: Unix Sockets

.. coroutinefunction:: open_unix_connection(path=None, \*, limit=None, \
.. coroutinefunction:: open_unix_connection(path=None, *, limit=None, \
ssl=None, sock=None, server_hostname=None, \
ssl_handshake_timeout=None)

Expand All @@ -126,7 +126,7 @@ and work with streams:


.. coroutinefunction:: start_unix_server(client_connected_cb, path=None, \
\*, limit=None, sock=None, backlog=100, ssl=None, \
*, limit=None, sock=None, backlog=100, ssl=None, \
ssl_handshake_timeout=None, start_serving=True)

Start a Unix socket server.
Expand Down Expand Up @@ -185,7 +185,7 @@ StreamReader
can be read. Use the :attr:`IncompleteReadError.partial`
attribute to get the partially read data.

.. coroutinemethod:: readuntil(separator=b'\\n')
.. coroutinemethod:: readuntil(separator=b'\n')

Read data from the stream until *separator* is found.

Expand Down
6 changes: 3 additions & 3 deletions Doc/library/asyncio-subprocess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ See also the `Examples`_ subsection.
Creating Subprocesses
=====================

.. coroutinefunction:: create_subprocess_exec(program, \*args, stdin=None, \
stdout=None, stderr=None, limit=None, \*\*kwds)
.. coroutinefunction:: create_subprocess_exec(program, *args, stdin=None, \
stdout=None, stderr=None, limit=None, **kwds)

Create a subprocess.

Expand All @@ -77,7 +77,7 @@ Creating Subprocesses


.. coroutinefunction:: create_subprocess_shell(cmd, stdin=None, \
stdout=None, stderr=None, limit=None, \*\*kwds)
stdout=None, stderr=None, limit=None, **kwds)

Run the *cmd* shell command.

Expand Down
18 changes: 9 additions & 9 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ is :meth:`loop.run_in_executor`.
Running an asyncio Program
==========================

.. function:: run(coro, \*, debug=False)
.. function:: run(coro, *, debug=False)

Execute the :term:`coroutine` *coro* and return the result.

Expand Down Expand Up @@ -247,7 +247,7 @@ Running an asyncio Program
Creating Tasks
==============

.. function:: create_task(coro, \*, name=None)
.. function:: create_task(coro, *, name=None)

Wrap the *coro* :ref:`coroutine <coroutine>` into a :class:`Task`
and schedule its execution. Return the Task object.
Expand Down Expand Up @@ -316,7 +316,7 @@ Sleeping
Running Tasks Concurrently
==========================

.. awaitablefunction:: gather(\*aws, return_exceptions=False)
.. awaitablefunction:: gather(*aws, return_exceptions=False)

Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
sequence *concurrently*.
Expand Down Expand Up @@ -488,7 +488,7 @@ Timeouts
Waiting Primitives
==================

.. coroutinefunction:: wait(aws, \*, timeout=None, return_when=ALL_COMPLETED)
.. coroutinefunction:: wait(aws, *, timeout=None, return_when=ALL_COMPLETED)

Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
iterable concurrently and block until the condition specified
Expand Down Expand Up @@ -573,7 +573,7 @@ Waiting Primitives
deprecated.


.. function:: as_completed(aws, \*, timeout=None)
.. function:: as_completed(aws, *, timeout=None)

Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
iterable concurrently. Return an iterator of coroutines.
Expand All @@ -593,7 +593,7 @@ Waiting Primitives
Running in Threads
==================

.. coroutinefunction:: to_thread(func, /, \*args, \*\*kwargs)
.. coroutinefunction:: to_thread(func, /, *args, **kwargs)

Asynchronously run function *func* in a separate thread.

Expand Down Expand Up @@ -723,7 +723,7 @@ Introspection
Task Object
===========

.. class:: Task(coro, \*, loop=None, name=None)
.. class:: Task(coro, *, loop=None, name=None)

A :class:`Future-like <Future>` object that runs a Python
:ref:`coroutine <coroutine>`. Not thread-safe.
Expand Down Expand Up @@ -889,7 +889,7 @@ Task Object
See the documentation of :meth:`Future.remove_done_callback`
for more details.

.. method:: get_stack(\*, limit=None)
.. method:: get_stack(*, limit=None)

Return the list of stack frames for this Task.

Expand All @@ -910,7 +910,7 @@ Task Object
stack are returned, but the oldest frames of a traceback are
returned. (This matches the behavior of the traceback module.)

.. method:: print_stack(\*, limit=None, file=None)
.. method:: print_stack(*, limit=None, file=None)

Print the stack or traceback for this Task.

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/base64.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ The modern interface provides:
.. versionadded:: 3.4


.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \\t\\n\\r\\v')
.. function:: a85decode(b, *, foldspaces=False, adobe=False, ignorechars=b' \t\n\r\v')

Decode the Ascii85 encoded :term:`bytes-like object` or ASCII string *b* and
return the decoded :class:`bytes`.
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/compileall.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ runtime.
Public functions
----------------

.. function:: compile_dir(dir, maxlevels=sys.getrecursionlimit(), ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None, \*, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)
.. function:: compile_dir(dir, maxlevels=sys.getrecursionlimit(), ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, workers=1, invalidation_mode=None, *, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)

Recursively descend the directory tree named by *dir*, compiling all :file:`.py`
files along the way. Return a true value if all the files compiled successfully,
Expand Down Expand Up @@ -231,7 +231,7 @@ Public functions
Added *stripdir*, *prependdir*, *limit_sl_dest* and *hardlink_dupes* arguments.
Default value of *maxlevels* was changed from ``10`` to ``sys.getrecursionlimit()``

.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None, \*, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)
.. function:: compile_file(fullname, ddir=None, force=False, rx=None, quiet=0, legacy=False, optimize=-1, invalidation_mode=None, *, stripdir=None, prependdir=None, limit_sl_dest=None, hardlink_dupes=False)

Compile the file with path *fullname*. Return a true value if the file
compiled successfully, and a false value otherwise.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/concurrent.futures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Executor Objects
.. versionchanged:: 3.5
Added the *chunksize* argument.

.. method:: shutdown(wait=True, \*, cancel_futures=False)
.. method:: shutdown(wait=True, *, cancel_futures=False)

Signal the executor that it should free any resources that it is using
when the currently pending futures are done executing. Calls to
Expand Down
4 changes: 2 additions & 2 deletions Doc/library/contextvars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ See also :pep:`567` for additional details.
Context Variables
-----------------

.. class:: ContextVar(name, [\*, default])
.. class:: ContextVar(name, [*, default])

This class is used to declare a new Context Variable, e.g.::

Expand Down Expand Up @@ -146,7 +146,7 @@ Manual Context Management

Context implements the :class:`collections.abc.Mapping` interface.

.. method:: run(callable, \*args, \*\*kwargs)
.. method:: run(callable, *args, **kwargs)

Execute ``callable(*args, **kwargs)`` code in the context object
the *run* method is called on. Return the result of the execution
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/ctypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2508,7 +2508,7 @@ other data types containing pointer type fields.
Arrays and pointers
^^^^^^^^^^^^^^^^^^^

.. class:: Array(\*args)
.. class:: Array(*args)

Abstract base class for arrays.

Expand Down
Loading