Guido: > one approach would be special cases in PyObject_GenericSetAttr, > I guess. Before using a hack like that, it might be better to think about what the real problem is. Seems to me the problem in general is that there's no way to prevent a class which overrides a method from having a superclass version of that method called through a back door. Which means you can't rely on method overriding to *restrict* what can be done to an object. So a proper fix would require either: (1) Providing some way for objects to prevent superclass methods from being called on them when they're not looking or (2) Fixing the typeobject not to rely on that for its security -- by hiding the real dict more deeply somehow? Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+
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