Visitar URL original
bpo-39530: Fix misleading statement about mixed-type numeric comparisons by mdickinson · Pull Request #18615 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20221223164937/https://github.com/python/cpython/pull/18615
Skip to content
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

Merged
merged 1 commit into from Mar 2, 2020

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Feb 23, 2020 •

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

Copy link
Member

@terryjreedy terryjreedy left a comment

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.

@mdickinson
Copy link
Member Author

mdickinson commented Mar 2, 2020

'narrower' is perhaps not the best term

Agreed; I'd be happy to see a rewording of the entire paragraph, but that's lower priority than fixing the incorrect information.

@mdickinson mdickinson merged commit 9f1cb1b into python:master Mar 2, 2020
@miss-islington
Copy link
Contributor

miss-islington commented Mar 2, 2020

Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.7, 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 2, 2020
…GH-18615)

(cherry picked from commit 9f1cb1b)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
@bedevere-bot
Copy link

bedevere-bot commented Mar 2, 2020

GH-18736 is a backport of this pull request to the 3.8 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 2, 2020
…GH-18615)

(cherry picked from commit 9f1cb1b)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
@bedevere-bot
Copy link

bedevere-bot commented Mar 2, 2020

GH-18737 is a backport of this pull request to the 3.7 branch.

ned-deily pushed a commit that referenced this pull request Mar 3, 2020
…) (GH-18737)

(cherry picked from commit 9f1cb1b)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
@miss-islington
Copy link
Contributor

miss-islington commented Mar 4, 2020

Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 4, 2020
…GH-18615)

(cherry picked from commit 9f1cb1b)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
@bedevere-bot
Copy link

bedevere-bot commented Mar 4, 2020

GH-18773 is a backport of this pull request to the 3.8 branch.

mdickinson added a commit that referenced this pull request Mar 4, 2020
…) (#18773)

(cherry picked from commit 9f1cb1b)

Co-authored-by: Mark Dickinson <mdickinson@enthought.com>

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants