colloquial names for types?

Andrew Koenig ark at
Sun Aug 25 19:40:35 CEST 2002

Chris> Andrew Koenig <ark at> wrote in 
Chris> news:yu99bs7q50yp.fsf at

>> For example, the colloquial type of 3
>> is "int", not "<type 'int'>", and the colloquial type of a class is
>> the name of the class, not including the module in which the class is
>> defined.

Chris> does that help:

>>>> type(3).__name__

Chris> types are classes and the __name__ attribute gives the class name.

Thanks.  I suspected there had to be something like that, but
it takes a two-level-deep search in the documentation to find it.

Andrew Koenig, ark at,

More information about the Python-list mailing list