bpo-30486: Allow setting cell value (#1840)
The cell_contents attribute of the cell object is now writable.
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 9708688..24a2618 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -510,6 +510,9 @@
| :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 @@
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.