David Hopwood wrote: > A restricted interpreter refuses access to any object attribute or method > with a name beginning with '_' (by throwing a new exception type > 'InternalAccessException'), unless the access is from a method and its > static target is that method's first argument variable. What's to stop def my_naughty_method(self): self = some_protected_object self._a_special_attribute = some_naughty_value > __init__ is an internal method. This is as it should be, because it should not > be possible to call __init__ on an existing object; only to have __init__ > implicitly called when a new object is constructed. What about calling an inherited __init__ method? Your proposed rule would seem to disallow BaseClass.__init__(self, ...) -- Greg
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4