Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,10 @@ Special read-only attributes
* - Attribute
- Meaning

* - .. attribute:: function.__builtins__
- A reference to the :class:`dictionary <dict>` that holds the function's
builtins namespace.

* - .. 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
Expand All @@ -569,6 +573,10 @@ Special read-only attributes
A cell object has the attribute ``cell_contents``.
This can be used to get the value of the cell, as well as set the value.

.. versionchanged:: 3.10
Comment thread
vstinner marked this conversation as resolved.
Outdated
Comment thread
vstinner marked this conversation as resolved.
Outdated

Add ``__builtins__`` attribute to functions.

Special writable attributes
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
Loading