Skip to content

Commit cd69f5b

Browse files
committed
Docs: add f_generator attribute to datamodel page and update index
1 parent e76464d commit cd69f5b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/reference/datamodel.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,6 +1633,7 @@ and are also passed to registered trace functions.
16331633

16341634
.. index::
16351635
single: f_back (frame attribute)
1636+
single: f_generator (frame attribute)
16361637
single: f_code (frame attribute)
16371638
single: f_globals (frame attribute)
16381639
single: f_locals (frame attribute)
@@ -1648,6 +1649,10 @@ Special read-only attributes
16481649
- Points to the previous stack frame (towards the caller),
16491650
or ``None`` if this is the bottom stack frame
16501651

1652+
* - .. attribute:: frame.f_generator
1653+
- Returns the generator or coroutine object that owns this frame,
1654+
or ``None`` if the frame is of a regular function.
1655+
16511656
* - .. attribute:: frame.f_code
16521657
- The :ref:`code object <code-objects>` being executed in this frame.
16531658
Accessing this attribute raises an :ref:`auditing event <auditing>`

0 commit comments

Comments
 (0)