Skip to content

Commit eb30c4e

Browse files
committed
Move docs from stdtypes to inspect
1 parent be9e5cb commit eb30c4e

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

‎Doc/builtins/stdtypes.rst‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,14 +1238,6 @@ the underlying generator function:
12381238
that does nothing.
12391239

12401240

1241-
The awaitables returned by :meth:`~agen.asend`, :meth:`~agen.athrow` and
1242-
:meth:`~agen.aclose` expose the generator they drive as a read-only
1243-
``ag_gen`` attribute.
1244-
1245-
.. versionadded:: 3.16
1246-
The ``ag_gen`` attribute.
1247-
1248-
12491241
.. _typesseq:
12501242

12511243
Sequence Types --- :class:`list`, :class:`tuple`, :class:`range`

‎Doc/library/inspect.rst‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,12 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
284284
| | | ``AGEN_SUSPENDED``, or |
285285
| | | ``AGEN_CLOSED`` |
286286
+-----------------+-------------------+---------------------------+
287+
| async generator | ag_gen | async generator driven by |
288+
| awaitable | | the awaitable returned |
289+
| | | from ``asend()``, |
290+
| | | ``athrow()``, or |
291+
| | | ``aclose()`` |
292+
+-----------------+-------------------+---------------------------+
287293
| coroutine | __name__ | name |
288294
+-----------------+-------------------+---------------------------+
289295
| | __qualname__ | qualified name |
@@ -360,6 +366,11 @@ attributes (see :ref:`import-mod-attrs` for module attributes):
360366
Add ``gi_state`` attribute to generators, ``cr_state`` attribute to
361367
coroutines, and ``ag_state`` attribute to async generators.
362368

369+
.. versionchanged:: 3.16
370+
371+
Add ``ag_gen`` attribute to the awaitables returned by the ``asend()``,
372+
``athrow()`` and ``aclose()`` methods of async generators.
373+
363374
.. function:: getmembers(object[, predicate])
364375

365376
Return all the members of an object in a list of ``(name, value)``

0 commit comments

Comments
 (0)