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

STINNER Victor report at bugs.python.org
Mon Mar 28 12:07:40 EDT 2022


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

In the Python C API, PEP 384 added PyType_FromSpec(). There is also PyStructSequence_NewType(). PEP 3121 proposed PyType_Copy() but it was never implemented: see bpo-3760. But in C, closures are implemented using a module state, or previously using a global or static variable: cell objects are not used for types implemented in C.

----------

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


More information about the Python-bugs-list mailing list