type vs. class

Thomas Thiele tnt-audio at t-online.de
Sun Dec 10 19:48:10 EST 2000


Hallo!

simple typetest

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

>>> class X:
	pass
	
>>> 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