colloquial names for types?

Chris Liechti cliechti at
Sun Aug 25 19:26:55 CEST 2002

Andrew Koenig <ark at> wrote in 
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.

does that help:

>>> type(3).__name__

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


Chris <cliechti at>

More information about the Python-list mailing list