Terry Reedy <tjre...@udel.edu> wrote: > Builtin classes, named or not, do not have dotted names > > >>> 1 .__class__ ><class 'int'> > >>> class C: pass > > I believe all others do, including C-coded extension classes. > > >>> C().__class__ ><class '__main__.C'> >
Not quite all. Classes created by calling the type constructor directly don't have to follow that rule: >>> C = type('Fred', (object,), {}) >>> C.__name__ 'Fred' -- http://mail.python.org/mailman/listinfo/python-list