[issue47143] Add functools.copy_class() which updates closures

STINNER Victor report at bugs.python.org
Mon Mar 28 12:02:15 EDT 2022


STINNER Victor <vstinner at python.org> added the comment:

If I understand correctly, a cell content can be modified since Python 3.7: since commit 64505a1f6c0af4574e17e823b27ffe24eca44df5 of bpo-30486:

    bpo-30486: Allow setting cell value (#1840)

Antoine Pitrou created bpo-30486 for cloudpickle:

"There are use cases for setting a cell value.  One such use case is for (un)pickling recursive closures (see heroic workaround here: https://github.com/cloudpipe/cloudpickle/pull/90/files#diff-d2a3618afedd4e124c532151eedbae09R74 ).  Other use cases may include tinkering around and general education value."

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47143>
_______________________________________


More information about the Python-bugs-list mailing list