AW: Getting an instance's class name?
Stefan Migowsky
smigowsky at dspace.de
Wed Feb 14 05:08:41 EST 2001
Hi,
try
>>> class A:
... pass
...
>>> C = A()
>>> C.__class__
<class __main__.A at eb27c8>
>>> C.__class__.__name__
'A'
>>>
Stefan
-----Ursprüngliche Nachricht-----
Von: Bjoern Giesler [mailto:un4e at rzstud1.rz.uni-karlsruhe.de]
Gesendet: Mittwoch, 14. Februar 2001 10:51
An: python-list at python.org
Betreff: Getting an instance's class name?
Hi,
can anyone tell me how to obtain the name(s) of the class(es) that
constitute an instance's type?
Thanks in advance,
--Björn
--
http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list