summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-03-28 19:10:37 (GMT)
committerGeorg Brandl <georg@python.org>2009-03-28 19:10:37 (GMT)
commita31aa45fbf57eecea909049095db23467769ac86 (patch)
treeb7676d264d6f5e68512311a019d9b63e11f68af0 /Doc
parentc18f6b023df77b227e70d09cb2ac6323eeccea14 (diff)
downloadcpython-a31aa45fbf57eecea909049095db23467769ac86.zip
cpython-a31aa45fbf57eecea909049095db23467769ac86.tar.gz
cpython-a31aa45fbf57eecea909049095db23467769ac86.tar.bz2
#5324: document __subclasses__().
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 5500f4f..f3ff505 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__()
+ [<type 'bool'>]
+
+
.. rubric:: Footnotes
.. [#] Additional information on these special methods may be found in the Python