File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
12511243Sequence Types --- :class: `list `, :class: `tuple `, :class: `range `
Original file line number Diff line number Diff 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) ``
You can’t perform that action at this time.
0 commit comments