From: Georg Brandl Date: Sat, 28 Mar 2009 19:10:37 +0000 (+0000) Subject: #5324: document __subclasses__(). X-Git-Tag: v2.7a1~1774 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a31aa45fbf57eecea909049095db23467769ac86;p=thirdparty%2FPython%2Fcpython.git #5324: document __subclasses__(). --- diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 5500f4fecfd5..f3ff505b0bff 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -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__() + [] + + .. rubric:: Footnotes .. [#] Additional information on these special methods may be found in the Python