-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-38255: Replace "method" with "attribute" in the description of super() #16331
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to do this. Delegating methods is the primary use case for super(), perhaps by a factor of over a hundred to one.
We can add "(or attributes)" but should keep the wording focused on methods.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Alright @rhettinger. I have used "(or data attributes)" instead of merely "(or attributes)" as a method is also an attribute (since the official tutorial uses this nomenclature: "There are two kinds of valid attribute names, data attributes and methods.") I have made the requested changes; please review again. |
Thanks for making the requested changes! @rhettinger: please review the changes made to this pull request. |
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
See the alternative PR at #16368 which adds a sentence to the section on the various ways to use super(). When people are first taught about super() (something I do frequently), it isn't a good idea to lead-off the discussion with attribute access. If user's first experiment is with attribute access, their odds of success will be low and it will distract from learning the primary, intended use of the tool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not merge this until the alternative PR has been discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend merging #16368 and closing this PR. Thanks all.
Thanks @rhettinger for the review and the alternative PR, it makes sense. I am closing this one. |
This PR will make the following change to the Built-in Functions chapter of the library documentation:
super()
, sincesuper()
is not restricted to method access but can also do data attribute access:https://bugs.python.org/issue38255