diff options
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/datamodel.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 9708688c5c..24a2618b01 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -510,6 +510,9 @@ Callable types | :attr:`__closure__` | ``None`` or a tuple of cells | Read-only | | | that contain bindings for the | | | | function's free variables. | | + | | See below for information on | | + | | the ``cell_contents`` | | + | | attribute. | | +-------------------------+-------------------------------+-----------+ | :attr:`__annotations__` | A dict containing annotations | Writable | | | of parameters. The keys of | | @@ -530,6 +533,9 @@ Callable types implementation only supports function attributes on user-defined functions. Function attributes on built-in functions may be supported in the future.* + 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. + Additional information about a function's definition can be retrieved from its code object; see the description of internal types below. |