Skip to content

Commit 27bd2d1

Browse files
[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 bbf722d) Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
1 parent 442f5ec commit 27bd2d1

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Doc/glossary.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ Glossary
9292

9393
asynchronous context manager
9494
An object which controls the environment seen in an
95-
:keyword:`async with` statement by defining :meth:`__aenter__` and
96-
:meth:`__aexit__` methods. Introduced by :pep:`492`.
95+
:keyword:`async with` statement by defining :meth:`~object.__aenter__` and
96+
:meth:`~object.__aexit__` methods. Introduced by :pep:`492`.
9797

9898
asynchronous generator
9999
A function which returns an :term:`asynchronous generator iterator`. It
@@ -113,26 +113,26 @@ Glossary
113113
An object created by a :term:`asynchronous generator` function.
114114

115115
This is an :term:`asynchronous iterator` which when called using the
116-
:meth:`__anext__` method returns an awaitable object which will execute
116+
:meth:`~object.__anext__` method returns an awaitable object which will execute
117117
the body of the asynchronous generator function until the next
118118
:keyword:`yield` expression.
119119

120120
Each :keyword:`yield` temporarily suspends processing, remembering the
121121
location execution state (including local variables and pending
122122
try-statements). When the *asynchronous generator iterator* effectively
123-
resumes with another awaitable returned by :meth:`__anext__`, it
123+
resumes with another awaitable returned by :meth:`~object.__anext__`, it
124124
picks up where it left off. See :pep:`492` and :pep:`525`.
125125

126126
asynchronous iterable
127127
An object, that can be used in an :keyword:`async for` statement.
128128
Must return an :term:`asynchronous iterator` from its
129-
:meth:`__aiter__` method. Introduced by :pep:`492`.
129+
:meth:`~object.__aiter__` method. Introduced by :pep:`492`.
130130

131131
asynchronous iterator
132-
An object that implements the :meth:`__aiter__` and :meth:`__anext__`
133-
methods. ``__anext__`` must return an :term:`awaitable` object.
132+
An object that implements the :meth:`~object.__aiter__` and :meth:`~object.__anext__`
133+
methods. :meth:`~object.__anext__` must return an :term:`awaitable` object.
134134
:keyword:`async for` resolves the awaitables returned by an asynchronous
135-
iterator's :meth:`__anext__` method until it raises a
135+
iterator's :meth:`~object.__anext__` method until it raises a
136136
:exc:`StopAsyncIteration` exception. Introduced by :pep:`492`.
137137

138138
attribute
@@ -149,7 +149,7 @@ Glossary
149149

150150
awaitable
151151
An object that can be used in an :keyword:`await` expression. Can be
152-
a :term:`coroutine` or an object with an :meth:`__await__` method.
152+
a :term:`coroutine` or an object with an :meth:`~object.__await__` method.
153153
See also :pep:`492`.
154154

155155
BDFL

Doc/library/exceptions.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ The following exceptions are the exceptions that are usually raised.
450450

451451
.. exception:: StopAsyncIteration
452452

453-
Must be raised by :meth:`__anext__` method of an
453+
Must be raised by :meth:`~object.__anext__` method of an
454454
:term:`asynchronous iterator` object to stop the iteration.
455455

456456
.. versionadded:: 3.5

0 commit comments

Comments
 (0)