We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cfcd524 commit 7d10d7fCopy full SHA for 7d10d7f
Doc/reference/datamodel.rst
@@ -569,6 +569,13 @@ Special read-only attributes
569
A cell object has the attribute ``cell_contents``.
570
This can be used to get the value of the cell, as well as set the value.
571
572
+ Only names that are actually referenced in the function body are
573
+ listed in :attr:`~codeobject.co_freevars` and therefore produce
574
+ entries in ``function.__closure__``. Variables defined in an
575
+ enclosing scope but never referenced inside the function do not
576
+ appear in the closure.
577
+
578
579
Special writable attributes
580
~~~~~~~~~~~~~~~~~~~~~~~~~~~
581
0 commit comments