summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-28 11:06:02 (GMT)
committerGitHub <noreply@github.com>2023-06-28 11:06:02 (GMT)
commit27bd2d1a9bbf2c3182f1565d38eff93e03417057 (patch)
tree61e8f52ca1e9267d896c40e8e994b53516e74667
parent442f5ec042a2d18eaaa49346d9c86bba6389958d (diff)
downloadcpython-27bd2d1a9bbf2c3182f1565d38eff93e03417057.zip
cpython-27bd2d1a9bbf2c3182f1565d38eff93e03417057.tar.gz
cpython-27bd2d1a9bbf2c3182f1565d38eff93e03417057.tar.bz2
[3.12] gh-101100: Fix reference to asynchronous methods (GH-106172) (#106191)
gh-101100: Fix reference to asynchronous methods (GH-106172) (cherry picked from commit bbf722dcd39c66418e45991dcf1cdf140c2ce20e) Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
-rw-r--r--Doc/glossary.rst18
-rw-r--r--Doc/library/exceptions.rst2
2 files changed, 10 insertions, 10 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index 53e8cdc..5c0f0f1 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -92,8 +92,8 @@ Glossary
asynchronous context manager
An object which controls the environment seen in an
- :keyword:`async with` statement by defining :meth:`__aenter__` and
- :meth:`__aexit__` methods. Introduced by :pep:`492`.
+ :keyword:`async with` statement by defining :meth:`~object.__aenter__` and
+ :meth:`~object.__aexit__` methods. Introduced by :pep:`492`.
asynchronous generator
A function which returns an :term:`asynchronous generator iterator`. It
@@ -113,26 +113,26 @@ Glossary
An object created by a :term:`asynchronous generator` function.
This is an :term:`asynchronous iterator` which when called using the
- :meth:`__anext__` method returns an awaitable object which will execute
+ :meth:`~object.__anext__` method returns an awaitable object which will execute
the body of the asynchronous generator function until the next
:keyword:`yield` expression.
Each :keyword:`yield` temporarily suspends processing, remembering the
location execution state (including local variables and pending
try-statements). When the *asynchronous generator iterator* effectively
- resumes with another awaitable returned by :meth:`__anext__`, it
+ resumes with another awaitable returned by :meth:`~object.__anext__`, it
picks up where it left off. See :pep:`492` and :pep:`525`.
asynchronous iterable
An object, that can be used in an :keyword:`async for` statement.
Must return an :term:`asynchronous iterator` from its
- :meth:`__aiter__` method. Introduced by :pep:`492`.
+ :meth:`~object.__aiter__` method. Introduced by :pep:`492`.
asynchronous iterator
- An object that implements the :meth:`__aiter__` and :meth:`__anext__`
- methods. ``__anext__`` must return an :term:`awaitable` object.
+ An object that implements the :meth:`~object.__aiter__` and :meth:`~object.__anext__`
+ methods. :meth:`~object.__anext__` must return an :term:`awaitable` object.
:keyword:`async for` resolves the awaitables returned by an asynchronous
- iterator's :meth:`__anext__` method until it raises a
+ iterator's :meth:`~object.__anext__` method until it raises a
:exc:`StopAsyncIteration` exception. Introduced by :pep:`492`.
attribute
@@ -149,7 +149,7 @@ Glossary
awaitable
An object that can be used in an :keyword:`await` expression. Can be
- a :term:`coroutine` or an object with an :meth:`__await__` method.
+ a :term:`coroutine` or an object with an :meth:`~object.__await__` method.
See also :pep:`492`.
BDFL
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 4c84e5f..49ede20 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -450,7 +450,7 @@ The following exceptions are the exceptions that are usually raised.
.. exception:: StopAsyncIteration
- Must be raised by :meth:`__anext__` method of an
+ Must be raised by :meth:`~object.__anext__` method of an
:term:`asynchronous iterator` object to stop the iteration.
.. versionadded:: 3.5