#5324: document __subclasses__().

This commit is contained in:
Georg Brandl 2009-03-28 19:10:37 +00:00
parent c18f6b023d
commit a31aa45fbf
1 changed files with 11 additions and 0 deletions

View File

@ -2674,6 +2674,17 @@ types, where they are relevant. Some of these are not reported by the
The name of the class or type.
.. method:: class.__subclasses__
:term:`New-style class`\ es keep a list of weak references to their immediate
subclasses. This method returns a list of all those references still alive.
Example::
>>> int.__subclasses__()
[<type 'bool'>]
.. rubric:: Footnotes
.. [#] Additional information on these special methods may be found in the Python