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
0a68b01d
Commit
0a68b01d
authored
Feb 25, 2009
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More markup and spelling fixes.
parent
79d0434a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Doc/library/functions.rst
Doc/library/functions.rst
+6
-6
No files found.
Doc/library/functions.rst
View file @
0a68b01d
...
@@ -1050,19 +1050,19 @@ are always available. They are listed here in alphabetical order.
...
@@ -1050,19 +1050,19 @@ are always available. They are listed here in alphabetical order.
been overridden in a class. The search order is same as that used by
been overridden in a class. The search order is same as that used by
:func:`getattr` except that the *type* itself is skipped.
:func:`getattr` except that the *type* itself is skipped.
The
``__mro__`` attribute of the *type* lists the method resolution search
The
:attr:`__mro__` attribute of the *type* lists the method resolution
order used by both :func:`getattr` and :func:`super`. The attribue is
search order used by both :func:`getattr` and :func:`super`. The attribute
dynamic and can change whenever the inheritance hierarchy is updated.
is
dynamic and can change whenever the inheritance hierarchy is updated.
If the second argument is omitted, the super object returned is unbound. If
If the second argument is omitted, the super object returned is unbound. If
the second argument is an object, ``isinstance(obj, type)`` must be true. If
the second argument is an object, ``isinstance(obj, type)`` must be true. If
the second argument is a type, ``issubclass(type2, type)`` must be true (this
the second argument is a type, ``issubclass(type2, type)`` must be true (this
is useful for classmethods).
is useful for classmethods).
There are two typical use cases for
"super"
. In a class hierarchy with
There are two typical use cases for
*super*
. In a class hierarchy with
single inheritance,
"super"
can be used to refer to parent classes without
single inheritance,
*super*
can be used to refer to parent classes without
naming them explicitly, thus making the code more maintainable. This use
naming them explicitly, thus making the code more maintainable. This use
closely parallels the use of
"super"
in other programming languages.
closely parallels the use of
*super*
in other programming languages.
The second use case is to support cooperative multiple inheritance in a
The second use case is to support cooperative multiple inheritance in a
dynamic execution environment. This use case is unique to Python and is
dynamic execution environment. This use case is unique to Python and is
...
...
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