Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
956ed978
Commit
956ed978
authored
Mar 31, 2009
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#4411: document mro() and __mro__. (I hope I got it right.)
parent
2ce1c61c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
Doc/library/stdtypes.rst
Doc/library/stdtypes.rst
+16
-1
No files found.
Doc/library/stdtypes.rst
View file @
956ed978
...
...
@@ -2675,9 +2675,24 @@ types, where they are relevant. Some of these are not reported by the
The name of the class or type.
The following attributes are only supported by :term:`new-style class`\ es.
.. attribute:: class.__mro__
This attribute is a tuple of classes that are considered when looking for
base classes during method resolution.
.. method:: class.mro()
This method can be overridden by a metaclass to customize the method
resolution order for its instances. It is called at class instantiation, and
its result is stored in :attr:`__mro__`.
.. method:: class.__subclasses__
:term:`New-style class`\ es keep a list of weak references to their
immediate
Each new-style class keeps a list of weak references to its
immediate
subclasses. This method returns a list of all those references still alive.
Example::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment