-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-39530: Fix misleading statement about mixed-type numeric comparisons #18615
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
bpo-39530: Fix misleading statement about mixed-type numeric comparisons #18615
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 also misinterpreted the old comparison sentence. The replacement sentence explains the seeming contradiction in
>>> n = 2**64 + 400; n > n + 1.5
True
'narrower' is perhaps not the best term, but it is a) standard, b) explained well enough in context, and c) a different issue.
Agreed; I'd be happy to see a rewording of the entire paragraph, but that's lower priority than fixing the incorrect information. |
Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8. |
…GH-18615) (cherry picked from commit 9f1cb1b) Co-authored-by: Mark Dickinson <[email protected]>
GH-18736 is a backport of this pull request to the 3.8 branch. |
…GH-18615) (cherry picked from commit 9f1cb1b) Co-authored-by: Mark Dickinson <[email protected]>
GH-18737 is a backport of this pull request to the 3.7 branch. |
…) (GH-18737) (cherry picked from commit 9f1cb1b) Co-authored-by: Mark Dickinson <[email protected]>
Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
…GH-18615) (cherry picked from commit 9f1cb1b) Co-authored-by: Mark Dickinson <[email protected]>
GH-18773 is a backport of this pull request to the 3.8 branch. |
…) (#18773) (cherry picked from commit 9f1cb1b) Co-authored-by: Mark Dickinson <[email protected]> Co-authored-by: Mark Dickinson <[email protected]>
There's a misleading statement in the documentation that suggests that (for example) an integer-to-float comparison is performed by first converting the integer to a float and then comparing the floats. This PR fixes that statement.
https://bugs.python.org/issue39530