File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -1633,6 +1633,7 @@ and are also passed to registered trace functions.
1633
1633
1634
1634
.. index ::
1635
1635
single: f_back (frame attribute)
1636
+ single: f_generator (frame attribute)
1636
1637
single: f_code (frame attribute)
1637
1638
single: f_globals (frame attribute)
1638
1639
single: f_locals (frame attribute)
@@ -1648,6 +1649,10 @@ Special read-only attributes
1648
1649
- Points to the previous stack frame (towards the caller),
1649
1650
or ``None `` if this is the bottom stack frame
1650
1651
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
+
1651
1656
* - .. attribute:: frame.f_code
1652
1657
- The :ref: `code object <code-objects >` being executed in this frame.
1653
1658
Accessing this attribute raises an :ref: `auditing event <auditing >`
You can’t perform that action at this time.
0 commit comments