Marc-Andre Lemburg added the comment:

I agree with Mark. This feature opens up a security hole large enough to drive 
a train through.

Looking at the python-dev thread, the only motivation appears to be making 
module look more like classes. I'd suggest to propose a PEP for making changes 
to module objects rather than creating a backdoor which let's you implement 
those changes at the expense of putting the whole interpreter at risk.

IMO, .__class__ of static types should not be mutable. I can understand why 
heap types need this feature (to e.g. be able to copy objects without invoking 
any .__init__() methods of unknown objects as is needed for unpickle style 
operations), but for static types the set of supported objects is limited and 
the consequences of calling their constructor is known.

----------
nosy: +lemburg

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24912>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to