On Thu, Jun 5, 2008 at 11:39 AM, Terry Reedy <[EMAIL PROTECTED]> wrote:
> > If you want to access the attribute of a particular class, to read or > write, use that class. > SomeClass.attr > Note that no instance is required or relevant. > > If you want to read the attrubute of the class of an instance (or the first > superclass with the attribute, whatever that class might be, use self.attr > or self.__class__.attr. (Use the latter if the instance has (or might > have) an attribute of the same name). > > For setting an attribute, self.attr = x sets it on the instance while > self.__class__.attr = x sets it on its class. > <http://mail.python.org/mailman/listinfo/python-list> > So the key here is that obj.__class__.attr will only access the immediate child class name space, but SuperClass.attr will guarantee your are access the first super class namespace? If that is true, then the bug makes sense.
-- http://mail.python.org/mailman/listinfo/python-list