https://github.com/python/cpython/commit/1e1bfe7bbe0f77e6848f8facdb4b2f0c27b3cc64
commit: 1e1bfe7bbe0f77e6848f8facdb4b2f0c27b3cc64
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: hugovk <[email protected]>
date: 2025-09-06T19:59:36+03:00
summary:

[3.14] gh-138191: Document ``frame.f_generator`` in the data model (GH-138540) 
(#138553)

Co-authored-by: dbXD320 <[email protected]>
Co-authored-by: Adam Turner <[email protected]>

files:
M Doc/reference/datamodel.rst

diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 7a8809e8012a6b..15e88800687333 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -1638,6 +1638,7 @@ and are also passed to registered trace functions.
    single: f_locals (frame attribute)
    single: f_lasti (frame attribute)
    single: f_builtins (frame attribute)
+   single: f_generator (frame attribute)
 
 Special read-only attributes
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1675,6 +1676,12 @@ Special read-only attributes
        (this is an index into the :term:`bytecode` string of the
        :ref:`code object <code-objects>`)
 
+   * - .. attribute:: frame.f_generator
+     - The :term:`generator` or :term:`coroutine` object that owns this frame,
+       or ``None`` if the frame is a normal function.
+
+       .. versionadded:: 3.14
+
 .. index::
    single: f_trace (frame attribute)
    single: f_trace_lines (frame attribute)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to