instance and class-hierarchy ?

Rene Pijlman reply.in.the.newsgroup at my.address.is.invalid
Wed Mar 29 21:14:36 CEST 2006


Bror Johansson:
>I have a class-hierarchy (fairly deep and fairly wide).
>
>Is there a good and general way to test an instance-object obj for having a
>class belonging to a certain "sub-tree" of the hierarchy with a common
>parent class C?

isinstance(obj,C)

-- 
René Pijlman



More information about the Python-list mailing list