abcd a écrit :
> yea i meant to have animal extend thing and dog extend animal....my
> mistake.
> 
> anyways, is there a way to check without having an instance of the
> class?
> 
> such as,
> 
> isinstance(Dog, (Animal, Thing)) ??
> 
> 
issubclass(Dog, Animal)

Note that such tests should only be used in a very few specific cases - 
certainly not to try&implement some kind of static typing... In Python, 
inheritance is mostly about implementation.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to