Skip to content

Commit da790e9

Browse files
committed
gh-101888: Add function.__builtins__ to ref documentation
1 parent f3dd0ca commit da790e9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Doc/reference/datamodel.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,10 @@ Special read-only attributes
556556
* - Attribute
557557
- Meaning
558558

559+
* - .. attribute:: function.__builtins__
560+
- A reference to the :class:`dictionary <dict>` that holds the function's
561+
builtins namespace.
562+
559563
* - .. attribute:: function.__globals__
560564
- A reference to the :class:`dictionary <dict>` that holds the function's
561565
:ref:`global variables <naming>` -- the global namespace of the module
@@ -569,6 +573,10 @@ Special read-only attributes
569573
A cell object has the attribute ``cell_contents``.
570574
This can be used to get the value of the cell, as well as set the value.
571575

576+
.. versionchanged:: 3.10
577+
578+
Add ``__builtins__`` attribute to functions.
579+
572580
Special writable attributes
573581
~~~~~~~~~~~~~~~~~~~~~~~~~~~
574582

0 commit comments

Comments
 (0)