From: Duncan Booth on
Terry Reedy <tjreedy(a)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'
 | 
Pages: 1
Prev: D-CM IDE
Next: Question on Python Function