On Mon, Nov 3, 2008 at 7:16 AM, Michel Perez <opsbat@infomed .sld.cuwrote:
....
....
True
True
(<class '__main__.Fathe r'>,)
--JamesMills
--
--
-- "Problems are solved by method"
HI all:
>
imagine something like this:
>
class father:
pass
class son( father ):
pass
>
I need to know the son ancestor class how can i know this.
>
imagine something like this:
>
class father:
pass
class son( father ):
pass
>
I need to know the son ancestor class how can i know this.
>>class Father(object): pass
>>class Son(Father): pass
>>son = Son()
>>isinstance(so n, Father)
>>isinstance(so n, Father)
>>isinstance(so n, Son)
>>son.__class__ .__bases__
>>>
--
--
-- "Problems are solved by method"