Listing subtypes

Paddy paddy3118 at googlemail.com
Thu Nov 29 01:41:06 EST 2007


On Nov 29, 1:09 am, Ben Finney <bignose+hates-spam at benfinney.id.au>
wrote:
> "Diez B. Roggisch" <deets at nospam.web.de> writes:
>
> > Ben Finney schrieb:
> > > A class knows its parents; it doesn't know its children. (Or, in
> > > other words, children need to know who their parents are, but
> > > aren't required to notify their parents about anything.)
>
> > Not right. These special children are under a more demanding
> > goverment.
>
> > [...]
> > print A.__subclasses__()
>
> Thanks. I've now learned my recommended daily dosage of one new thing.
>
> --
>  \     "Unix is an operating system, OS/2 is half an operating system, |
>   `\       Windows is a shell, and DOS is a boot partition virus."  -- |
> _o__)                                                  Peter H. Coffin |
> Ben Finney

>From http://coding.derkeiler.com/Archive/Python/comp.lang.python/2004-02/4172.html
it seems to be an undocumented feature. Read the post and decide for
yourself if you want to depend on it.

- Paddy.



More information about the Python-list mailing list