[issue24912] The type of cached objects is mutable
Marc-Andre Lemburg
report at bugs.python.org
Tue Sep 1 11:41:41 CEST 2015
Marc-Andre Lemburg added the comment:
FWIW: I still think that allowing to change .__class__ on instances of static types if wrong and should be undone. If we want to make this a feature of the language we should have a PEP and the associated discussion to be able to judge and document the possible consequences of such a change. This ticket is the wrong place for such a discussion.
Regarding you module object change: Why don't you propose a change on the object itself instead of trying to monkey patch it via a mod.__class__ replacement ? E.g. by defining a hook in the object to set which then permits whatever modification you'd like to make.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24912>
_______________________________________
More information about the Python-bugs-list
mailing list