-
-
Notifications
You must be signed in to change notification settings - Fork 32k
[doc] Teach 0-args form of super in Programming FAQ #22176
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
This change looks good. While you're at it, the rest of the entry can be fixed up. In the title, replace "override" with "extend". Also the text paragraph that follows needs to be revised. |
@rhettinger had doubts about removing the mention to classic classes, you think that's alright? OtherwIse, I'm not sure what you meant by revising the folllowing paragraph, sorry. |
If you are talking about the next question ("How can I organize my code to make it easier to change the base class? |
I would remove the entire paragraph that starts with "For version prior to 3.0, you may be using classic classes". That is no longer relevant. Perhaps replace the paragraph with an explanation of what the zero-arg form of super() is actually doing. It figures out the self argument which it uses to derive the MRO. Then it figures out that the current class is Derived and uses that information to determine where in the MRO to start seaching. |
@rhettinger I have made the suggested changes |
Teach simpler and more maintainable use of super.