By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,587 Members | 1,718 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,587 IT Pros & Developers. It's quick & easy.

Re: find an object ancestor

P: n/a
Thanks it works OK

On Thu, 2008-11-06 at 13:14 +1000, James Mills wrote:
On Mon, Nov 3, 2008 at 7:16 AM, Michel Perez <op****>
HI all:

imagine something like this:

class father:
class son( father ):

I need to know the son ancestor class how can i know this.
>class Father(object): pass
>class Son(Father): pass
>son = Son()
isinstance(son, Father)
>isinstance(son, Son)
(<class '__main__.Father'>,)


Red Telematica de Salud - Cuba
CNICM - Infomed
Nov 6 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.