On 4/10/07, Greg Ewing <[EMAIL PROTECTED]> wrote:
Phillip J. Eby wrote: > The __subclasses__ method is useful -- even more so in 3.x than in 2.x, > because in 3.x there are no classic classes. For security purposes, I think it would be better to adopt a principle that it shouldn't be possible to do anything dangerous merely by instantiating a class (e.g. open() opens files, but file() doesn't). Then __subclasses__ would be harmless.
True. As long as you don't use class attributes or have dangerous default arguments (and that is the kicker usually) then that policy is doable. And I should clarify that the method does not need to disappear as it can move to an extension module somewhere. I just don't want it exposed right off of object and thus in the built-in namespace. -Brett
_______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
