[issue47144] Allow setting __classcell__
STINNER Victor
report at bugs.python.org
Mon Mar 28 11:15:12 EDT 2022
STINNER Victor <vstinner at python.org> added the comment:
> This is unfortunate as there is a use-case for such trickery: if the method of a class A are only used to be grafted onto another class B (monkey patching), A.__classcell__ should be set to B so that super() works as expected.
Would you elaborate your use case?
Would bpo-47143 "Add functools.copy_class() which updates closures" solve your use case?
----------
nosy: +vstinner
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47144>
_______________________________________
More information about the Python-bugs-list
mailing list