-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
gh-85959: (bpo-41793) Fix an inaccuracy about reflected methods in datamodel docs #22257
Conversation
…for the reflected method to take precedence avoids an edge case / counter-example when the types are actually equal.
Doesn't
basically already imply this? i.e one that's not a strict subclass would not have an "ancestor" in the class hierarchy. |
Guess that depends how you define ancestors (it's not in the glossary). |
Makes sense. I don't think "strict subclass" is a well known enough term, at the very least it takes up a bit of digging on google to find a definition. Maybe it's better to be verbose and say something to the effect of, "is a subclass but not the same class (strict subclass)" |
The main paragraph about these methods says:
That's not fulfilled in the example. I think that takes precedence, so that the note you're talking about doesn't apply. And that the note is only about which one goes first if both could. Also see the footnote:
(That seems to be missing a few words after "fails the operation", though, the sentence doesn't make sense to me.) |
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.
Remove strict
.
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 |
@ethanfurman I've reduced the scope of the note so that it just concerns the rationale, leaving the main paragraph to fully specify the behaviour (approximately along the lines of your suggestion). Let me know if you think that improves/simplifies things, or made it worse :) for bot: I have made the requested changes; please review again. |
Thanks for making the requested changes! @ethanfurman: please review the changes made to this pull request. |
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.
Getting closer!
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 |
@ethanfurman I have just resolved some conflicts against |
@ethanfurman I've resolved conflicts (again). |
Wow, thanks for staying on this. Reviewing now. |
@ethanfurman I will let you determine when to merge and if to backport. Thanks! Bravo @wimglenn for being patient and persistent |
Concerning when the reflected operation takes precedence (docs)
Qualifying that the right operand's type must be a strict subclass avoids a counter-example when the types are actually equal
https://bugs.python.org/issue41793