]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-101888: Add function.__builtins__ to ref documentation (GH-144174) (#144253)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 26 Jan 2026 16:22:31 +0000 (17:22 +0100)
committerGitHub <noreply@github.com>
Mon, 26 Jan 2026 16:22:31 +0000 (16:22 +0000)
gh-101888: Add function.__builtins__ to ref documentation (GH-144174)
(cherry picked from commit 933540e33217474abee3e1b53dec28ad927b6311)

Co-authored-by: Victor Stinner <vstinner@python.org>
Doc/reference/datamodel.rst

index 0ffc83357900828d267c4bd0d8d4f6b2be53c38e..3b21fb555155e2a773a8fc9be17f0df7baadd78f 100644 (file)
@@ -541,6 +541,7 @@ Special read-only attributes
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. index::
+   single: __builtins__ (function attribute)
    single: __closure__ (function attribute)
    single: __globals__ (function attribute)
    pair: global; namespace
@@ -551,6 +552,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