Can someone explain the following? ============================ class Type(object): pass o = Type() o.a = 1 print o, o.a print dir(object) ==> ['__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__'] ==> no problem o = object() o.a = 1 ==> AttributeError: 'object' object has no attribute 'a' ================================
Type does not create any additional attribute or member, or what? Does this mean that the type 'object' has a hidden __slots__ attr? Then why doesn't Type inherit it, like any attribute? Denis ------ la vida e estranya _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor