Prothon Prototypes vs Python Classes

Joe Mason joe at notcharles.ca
Sun Mar 28 08:42:50 CEST 2004


In article <mailman.6.1080446668.20120.python-list at python.org>, Andrew Bennetts wrote:
> Actually, in Python, it's even easier than that:
> 
>>>> class C(object): pass
> ... 
>>>> class D(C): pass
> ... 
>>>> C.__subclasses__()
> [<class '__main__.D'>]

Cool.  How come this isn't in either the Language Reference or Library
Reference?  I just skimmed through those looking for special
class-related methods the other day, when I first started looking at
prototypes, and didn't notice __subclasses__, and now I can't find it in
the index.

Joe



More information about the Python-list mailing list