Martin v. Löwis added the comment:

hackcheck fixes the "Carlo Verry hack", which goes like this:

py> object.__setattr__(str, 'lower', str.upper)
py> 'dammit Carlo!'.lower()
'DAMMIT CARLO!'
(from http://bugs.jython.org/issue1058)

It shouldn't be possible to monkey-patch a builtin type; I believe this is to 
prevent crashes when self has the incorrect layout. Other than that, I find 
that an arbitrary restriction, except that setattr/attribute assignment prevent 
an assignment from occurring, it shouldn't be possible to bypass this by 
calling __setattr__. So if the restriction could be lifted, it should be lifted 
in both cases.

What specific decimal test is failing?

----------

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

Reply via email to