How to find out which functions exist?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Oct 24 00:47:47 EDT 2007


En Tue, 23 Oct 2007 18:10:04 -0300, mrstephengross  
<mrstephengross at hotmail.com> escribió:

> Let's say I have a python file with a base class, and a few derived
> classes:
>
> class Base:
>   pass
>
> class Derived1(Base):
>   pass
>
> class Derived2(Base):
>   pass
>
> Is there a way I can find out the classes that have been derived from
> Base?

If Base were a new-style class, you could use Base.__subclasses__()

-- 
Gabriel Genellina




More information about the Python-list mailing list