Michael Foord <mich...@voidspace.org.uk> added the comment: __dict__ as a property is documented as an exception to the "no code execution" claim.
The patch is not sufficient - instances may have a class member "__dict__" whilst still having an instance __dict__. Alternatively the "__dict__" property may be provided by a base class and so not available in "type(obj).__dict__" but still be provided by a property. I don't think there is any general way to tell whether fetching obj.__dict__ will get an instance dictionary or fetch a "__dict__" member from the class or a base-class... (Hence the documented exception.) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11133> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com