★ wanayoo — archive 1999 http://www.python.org/search/hypermail/python-1994q3/0375.htmlNouvelle recherche | Portail wanayoo
Python Archives (1994q3): Finding out an objects type

Finding out an objects type

Michael Powers (powers@dvts.com)
Mon, 29 Aug 1994 16:07:48 -0700

In all this time I have not had a need for this but now I found one. I want
to know what class and object is. For instance I would like to do this:

class Fake:
fakevar = 9

f = Fake()

if f isKindof Fake:
print "Found it"

-------
type doesn't do this for me, it only says whether its and instance, a
string, a class, etc.

Mike