type vs. class

Thomas Thiele tnt-audio at t-online.de
Mon Dec 11 01:48:10 CET 2000


simple typetest

>>> type(3)
<type 'int'>

>>> class X:
>>> x = X()
>>> type(x)
<type 'instance'>

How can I realize that I will not get type 'instance' but type 'X'? I
have different classes, more than one, and I want to check out which
class it is.  Are all classes type instance?

More information about the Python-list mailing list