Skip to content

Improve base method overriding explanation for comparison and numeric methods #18527

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

Closed
wants to merge 1 commit into from

Conversation

geryogam
Copy link
Contributor

@geryogam geryogam commented Feb 16, 2020

This PR will:

  • use for comparison methods the same (almost) better explanation of base method overriding as that in the note for numeric methods (which explains the goal of the priority rule—overriding base methods—and is more readable):

    Note: If the right operand’s type is a subclass of the left operand’s type and that subclass provides the reflected method for the operation, this method will be called before the left operand’s non-reflected method. This behavior allows subclasses to override their ancestors’ operations.

  • state for numeric methods that this priority call to the right operand’s reflected method is restricted to strict subclasses (it was already stated for comparison methods).

@geryogam geryogam changed the title Improve base method overriding explanation for rich comparisons Improve base method overriding explanation for comparison and numeric methods Feb 16, 2020
@geryogam geryogam closed this Mar 10, 2021
@geryogam geryogam deleted the patch-14 branch March 10, 2021 09:37
@geryogam
Copy link
Contributor Author

Closed as already merged in another PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants