Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a51e58

Browse files
committed
Merged revisions 70648 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r70648 | georg.brandl | 2009-03-28 14:10:37 -0500 (Sa, 28 Mär 2009) | 1 line #5324: document __subclasses__(). ........
1 parent 636950f commit 7a51e58

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2665,6 +2665,16 @@ types, where they are relevant. Some of these are not reported by the
26652665

26662666
The name of the class or type.
26672667

2668+
2669+
.. method:: class.__subclasses__
2670+
2671+
All classes keep a list of weak references to their immediate subclasses.
2672+
This method returns a list of all those references still alive. Example::
2673+
2674+
>>> int.__subclasses__()
2675+
[<type 'bool'>]
2676+
2677+
26682678
.. rubric:: Footnotes
26692679

26702680
.. [#] Additional information on these special methods may be found in the Python

0 commit comments

Comments
 (0)