From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 26 Jan 2026 16:21:33 +0000 (+0100) Subject: [3.14] gh-101888: Add function.__builtins__ to ref documentation (GH-144174) (#144252) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5b23ebc0376c11ec70b0adcb3a8459f1c86ede3;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-101888: Add function.__builtins__ to ref documentation (GH-144174) (#144252) gh-101888: Add function.__builtins__ to ref documentation (GH-144174) (cherry picked from commit 933540e33217474abee3e1b53dec28ad927b6311) Co-authored-by: Victor Stinner --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 71f669af76d8..ed9389a0d902 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -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 ` that holds the function's + builtins namespace. + + .. versionadded:: 3.10 + * - .. attribute:: function.__globals__ - A reference to the :class:`dictionary ` that holds the function's :ref:`global variables ` -- the global namespace of the module