colloquial names for types?
Andrew Koenig
ark at research.att.com
Sun Aug 25 12:59:10 EDT 2002
Is there an easy way to determine the colloquial name of an object's
type? By "colloquial name" I mean the name by which one would refer
to it in casual conversation. 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.
I understand that such names can be ambiguous. However, they are
useful for printing human-readable representations of complicated
data structures.
More information about the Python-list
mailing list