Skip to content

Commit e5c5830

Browse files
dbXD320AA-Turner
andauthored
gh-138191: Document frame.f_generator in the data model (#138540)
Co-authored-by: Adam Turner <[email protected]>
1 parent cb7ef18 commit e5c5830

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Doc/reference/datamodel.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,7 @@ and are also passed to registered trace functions.
16381638
single: f_locals (frame attribute)
16391639
single: f_lasti (frame attribute)
16401640
single: f_builtins (frame attribute)
1641+
single: f_generator (frame attribute)
16411642

16421643
Special read-only attributes
16431644
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1675,6 +1676,12 @@ Special read-only attributes
16751676
(this is an index into the :term:`bytecode` string of the
16761677
:ref:`code object <code-objects>`)
16771678

1679+
* - .. attribute:: frame.f_generator
1680+
- The :term:`generator` or :term:`coroutine` object that owns this frame,
1681+
or ``None`` if the frame is a normal function.
1682+
1683+
.. versionadded:: 3.14
1684+
16781685
.. index::
16791686
single: f_trace (frame attribute)
16801687
single: f_trace_lines (frame attribute)

0 commit comments

Comments
 (0)