colloquial names for types?
Chris Liechti
cliechti at gmx.net
Sun Aug 25 13:26:55 EDT 2002
Andrew Koenig <ark at research.att.com> wrote in
news:yu99bs7q50yp.fsf at europa.research.att.com:
> 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
--
Chris <cliechti at gmx.net>
More information about the Python-list
mailing list