This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients douglas-raillard-arm, vstinner
Date 2022-03-28.15:15:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648480512.71.0.101196525096.issue47144@roundup.psfhosted.org>
In-reply-to
Content
> 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?
History
Date User Action Args
2022-03-28 15:15:12vstinnersetrecipients: + vstinner, douglas-raillard-arm
2022-03-28 15:15:12vstinnersetmessageid: <1648480512.71.0.101196525096.issue47144@roundup.psfhosted.org>
2022-03-28 15:15:12vstinnerlinkissue47144 messages
2022-03-28 15:15:12vstinnercreate