Repository navigation
bpo-23674: Clarify ambiguities in super() docs #15564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1589,8 +1589,15 @@ 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 *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 *type* lists the method | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one should be
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exactly. |
||||||
| resolution search order used by both :func:`getattr` and :func:`super`. The | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer the wording that references both getattr and super. Those two are deeply related. |
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.