How to find the name of your class?

Laurent POINTAL pointal at lure.u-psud.fr
Tue Nov 7 06:49:06 EST 2000


On Tue, 07 Nov 2000 10:41:05 +0000, Dale Strickland-Clark
<dale at out-think.NOSPAMco.uk> wrote:

>: Both str() and repr() will tell me the name of the class of an
>: instance but with a load of other info.
>: 
>: How can I get the name alone - without extracting a substring?

x.__class__.__name__

Et hop.

A+

Laurent.
---
Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email  : pointal at lure.u-psud.fr  ou  lpointal at planete.net 



More information about the Python-list mailing list