gh-101888: Add function.__builtins__ to ref documentation (#144174)

This commit is contained in:
Victor Stinner 2026-01-26 17:15:47 +01:00 committed by GitHub
parent 04d497c284
commit 933540e332
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View 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