diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index ec2fe968b73..608cb07cc8f 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2665,6 +2665,16 @@ types, where they are relevant. Some of these are not reported by the The name of the class or type. + +.. method:: class.__subclasses__ + + All classes 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