"Patrick Maupin" <[EMAIL PROTECTED]> writes on 26 Aug 2006 12:51:44 -0700: > ... > The only > problem I personally know of is that the __slots__ aren't inherited,
"__slots__" *ARE* inherited, although the rules may be a bit complex. >>> class B(object): ... __slots__ = ('f1', 'f2',) ... >>> class C(B): pass ... >>> C.__slots__ ('f1', 'f2') >>> c=C() >>> c.__dict__ {} >>> c.f1='f1' >>> c.__dict__ {} >>> c.fc='fc' >>> c.__dict__ {'fc': 'fc'} >>> class C2(B): ... __slots__=('f21',) ... >>> C2.__slots__ ('f21',) >>> c2=C2() >>> c2.f1='x' >>> c2.f21='y' -- Dieter -- http://mail.python.org/mailman/listinfo/python-list