-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
gh-66646: Explain __base__ attribute in the docs #102554
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
base: main
Are you sure you want to change the base?
Conversation
I’m not sure that this implementation detail should be documented in three places. |
@merwok Since |
I understand your reason, but still think one place would be better than 3. I would like to see other people’s opinion! For the markup, I meant this: https://devguide.python.org/documentation/markup/#codecell33 🙂 |
CC: @hugovk @CAM-Gerlach |
I don't have a strong opinion, but if it's an implementation detail, fewer places might be better. The search should help people find it when they're looking. |
@furkanonder, can you please rework this PR to align with the comments Raymond, Guido, and Éric gave on the issue? |
@erlend-aasland Based on Raymond, Guido, and Éric's feedback, I believe changes have been made. Could you please let me know if there is anything I missed? |
Not at all. I will repeat their comments here: Raymond said in #66646 (comment):
Guido followed up in #66646 (comment):
So, we're talking about a non-guaranteed implementation detail. You've also been told multiple times that a single mention is sufficient, yet you do not follow up this; your PR still changes three doc files, including the reference. "Worth a mention" is far from your PR which adds 64 (!) lines. I'm sorry, but I cannot see that you've taken any review or issue remarks into account. |
I didn't think that the idea of repetition here was stated unequivocally, since he said |
The statement does not include a line count for the section to be documented. Hence I did not consider the amount of lines for the section. The reason for the 64 lines of the section was to ensure a better understanding of the subject by supporting it with examples. |
I re-read the original ticket — I think this PR adds too much text. |
I've shortened the explanation as requested. I was thinking that keeping the examples would make it easier to understand. Regarding your comment about "inheritance that should be already covered somewhere else" - it actually hasn't been covered anywhere else in the documentation. Could you point me to where you think this information should be documented instead? |
You’re right, the specific docs for __bases__ and __mro__ don’t explain how base classes (included parent classes) are collapsed. But https://docs.python.org/3/howto/mro.html does. If you think clarifications are helpful, I would expand the notes for one of these official attributes, not __base__. |
Co-authored by: Anupama Srinivas Murthy