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 lemburg
Recipients Guido.van.Rossum, Mark.Shannon, benjamin.peterson, eltoder, larry, lemburg, njs, pitrou, rhettinger, serhiy.storchaka
Date 2015-09-01.09:41:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441100501.53.0.463001267421.issue24912@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-09-01 09:41:41lemburgsetrecipients: + lemburg, rhettinger, pitrou, larry, benjamin.peterson, njs, Mark.Shannon, eltoder, serhiy.storchaka, Guido.van.Rossum
2015-09-01 09:41:41lemburgsetmessageid: <1441100501.53.0.463001267421.issue24912@psf.upfronthosting.co.za>
2015-09-01 09:41:41lemburglinkissue24912 messages
2015-09-01 09:41:41lemburgcreate