Checking if class is derived of some other class

Alexander Skwar news.ASkwar at DigitalProjects.com
Mon Apr 22 15:11:59 EDT 2002


Hello.

I'm using Python 2.2.1.

Suppose I've got the following classes/objects:

class a:
	pass
class b(a):
	pass
class c(b):
	pass

myObject = c

How can I check if myObject is either directly instantiated from class a
or is if of a class which inherited from class a?

Thanks,

Alexander Skwar
-- 
How to quote:	http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:	http://www.iso-top.de      |    Jabber: askwar at a-message.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
                       Uptime: 12 hours 23 minutes



More information about the Python-list mailing list