summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-03-28 19:13:21 (GMT)
committerGeorg Brandl <georg@python.org>2009-03-28 19:13:21 (GMT)
commit7a51e589a45ce997d7abefb1d1c7760b2dd159f1 (patch)
treef83ece60a95f2229f68647adad6e005a4233e6b7
parent636950f925d50763537d40342ec622808c9b7e9d (diff)
downloadcpython-7a51e589a45ce997d7abefb1d1c7760b2dd159f1.zip
cpython-7a51e589a45ce997d7abefb1d1c7760b2dd159f1.tar.gz
cpython-7a51e589a45ce997d7abefb1d1c7760b2dd159f1.tar.bz2
Merged revisions 70648 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r70648 | georg.brandl | 2009-03-28 14:10:37 -0500 (Sa, 28 Mär 2009) | 1 line #5324: document __subclasses__(). ........
-rw-r--r--Doc/library/stdtypes.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index ec2fe96..608cb07 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__()
+ [<type 'bool'>]
+
+
.. rubric:: Footnotes
.. [#] Additional information on these special methods may be found in the Python