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
cd81f050
Commit
cd81f050
authored
Aug 29, 2019
by
Raymond Hettinger
Committed by
GitHub
Aug 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-23674: Clarify ambiguities in super() docs (#15564)
parent
122376df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Doc/library/functions.rst
Doc/library/functions.rst
+10
-3
No files found.
Doc/library/functions.rst
View file @
cd81f050
...
...
@@ -1589,10 +1589,17 @@ are always available. They are listed here in alphabetical order.
Return a proxy object that delegates method calls to a parent or sibling
class of *type*. This is useful for accessing inherited methods that have
been overridden in a class. The search order is same as that used by
:func:`getattr` except that the *type* itself is skipped.
been overridden in a class.
The :attr:`~class.__mro__` attribute of the *type* lists the method
The *object-or-type* determines the :term:`method resolution order`
to be searched. The search starts from the class right after the
*type*.
For example, if :attr:`~class.__mro__` of *object-or-type* is
``D -> B -> C -> A -> object`` and the value of *type* is ``B``,
then :func:`super` searches ``C -> A -> object``.
The :attr:`~class.__mro__` attribute of the *object-or-type* lists the method
resolution search order used by both :func:`getattr` and :func:`super`. The
attribute is dynamic and can change whenever the inheritance hierarchy is
updated.
...
...
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