Skip to content

[3.8] [doc] Fix erroneous backslashes in signatures and names (GH-23658) #23828

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 1 commit into from
Dec 22, 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 @@ -309,7 +309,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 @@ -344,7 +344,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 @@ -470,7 +470,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 @@ -547,7 +547,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 @@ -580,7 +580,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 @@ -671,7 +671,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 @@ -696,7 +696,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 @@ -761,7 +761,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 @@ -794,7 +794,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 @@ -804,7 +804,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 @@ -918,7 +918,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 @@ -952,7 +952,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 @@ -1017,7 +1017,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 @@ -1052,7 +1052,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 @@ -1222,9 +1222,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 @@ -1304,9 +1304,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, *, \
loop=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 @@ -74,7 +74,7 @@ and work with streams:
The *ssl_handshake_timeout* parameter.

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

.. rubric:: Unix Sockets

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

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


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

Expand Down Expand Up @@ -192,7 +192,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,9 +61,9 @@ See also the `Examples`_ subsection.
Creating Subprocesses
=====================

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

Create a subprocess.

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

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

Run the *cmd* shell command.

Expand Down
16 changes: 8 additions & 8 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 @@ -245,7 +245,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 @@ -317,7 +317,7 @@ Sleeping
Running Tasks Concurrently
==========================

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

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

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

Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
Expand Down Expand Up @@ -585,7 +585,7 @@ Waiting Primitives
deprecated.


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

Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
iterable concurrently. Return an iterator of coroutines.
Expand Down Expand Up @@ -679,7 +679,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 @@ -842,7 +842,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 @@ -863,7 +863,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 @@ -178,7 +178,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/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
6 changes: 3 additions & 3 deletions Doc/library/difflib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
contains a good example of its use.


.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n')
.. function:: context_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n')

Compare *a* and *b* (lists of strings); return a delta (a :term:`generator`
generating the delta lines) in context diff format.
Expand Down Expand Up @@ -279,7 +279,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.
emu


.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\\n')
.. function:: unified_diff(a, b, fromfile='', tofile='', fromfiledate='', tofiledate='', n=3, lineterm='\n')

Compare *a* and *b* (lists of strings); return a delta (a :term:`generator`
generating the delta lines) in unified diff format.
Expand Down Expand Up @@ -321,7 +321,7 @@ diffs. For comparing directories and files, see also, the :mod:`filecmp` module.

See :ref:`difflib-interface` for a more detailed example.

.. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\\n')
.. function:: diff_bytes(dfunc, a, b, fromfile=b'', tofile=b'', fromfiledate=b'', tofiledate=b'', n=3, lineterm=b'\n')

Compare *a* and *b* (lists of bytes objects) using *dfunc*; yield a
sequence of delta lines (also bytes) in the format returned by *dfunc*.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/email.header.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Here is the :class:`Header` class description:
if *s* is a byte string.


.. method:: encode(splitchars=';, \\t', maxlinelen=None, linesep='\\n')
.. method:: encode(splitchars=';, \t', maxlinelen=None, linesep='\n')

Encode a message header into an RFC-compliant format, possibly wrapping
long lines and encapsulating non-ASCII parts in base64 or quoted-printable
Expand Down
Loading