]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-101888: Add function.__builtins__ to ref documentation (#144174)
authorVictor Stinner <vstinner@python.org>
Mon, 26 Jan 2026 16:15:47 +0000 (17:15 +0100)
committerGitHub <noreply@github.com>
Mon, 26 Jan 2026 16:15:47 +0000 (17:15 +0100)
Doc/reference/datamodel.rst

index 1bfe6b7375bcf7ecdb9dfddda86fe35faf270b81..f784d963f9d3e185d1b7c5ca8d36ed966e02784e 100644 (file)
@@ -546,6 +546,7 @@ Special read-only attributes
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. index::
+   single: __builtins__ (function attribute)
    single: __closure__ (function attribute)
    single: __globals__ (function attribute)
    pair: global; namespace
@@ -556,6 +557,12 @@ Special read-only attributes
    * - Attribute
      - Meaning
 
+   * - .. attribute:: function.__builtins__
+     - A reference to the :class:`dictionary <dict>` that holds the function's
+       builtins namespace.
+
+       .. versionadded:: 3.10
+
    * - .. attribute:: function.__globals__
      - A reference to the :class:`dictionary <dict>` that holds the function's
        :ref:`global variables <naming>` -- the global namespace of the module