Skip to content

Conversation

@mdickinson
Copy link
Member

@mdickinson mdickinson commented Aug 4, 2022

This PR fixes the error message from float(s) in the case where s contains only whitespace.

Closes #95605.

@mdickinson
Copy link
Member Author

mdickinson commented Aug 9, 2022

@ericvsmith Would you have bandwidth for review, by any chance? I think it's a fairly simple fix. (Indeed, I was sorely tempted to try a more complicated refactoring and cleanup, but I think that's best left for 3.12.)

Copy link
Member

@ericvsmith ericvsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks correct to me. Thanks, @mdickinson!

@mdickinson
Copy link
Member Author

Thanks, @ericvsmith!

@mdickinson mdickinson merged commit 97e9cfa into python:main Aug 10, 2022
@miss-islington
Copy link
Contributor

Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-bot
Copy link

GH-95858 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Aug 10, 2022
@bedevere-bot
Copy link

GH-95859 is a backport of this pull request to the 3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 10, 2022
…hitespace (pythonGH-95665)

This PR fixes the error message from float(s) in the case where s contains only whitespace.
(cherry picked from commit 97e9cfa)

Co-authored-by: Mark Dickinson <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 10, 2022
…hitespace (pythonGH-95665)

This PR fixes the error message from float(s) in the case where s contains only whitespace.
(cherry picked from commit 97e9cfa)

Co-authored-by: Mark Dickinson <[email protected]>
mdickinson added a commit that referenced this pull request Aug 10, 2022
…ace (GH-95665) (GH-95859)

This PR fixes the error message from float(s) in the case where s contains only whitespace.
(cherry picked from commit 97e9cfa)

Co-authored-by: Mark Dickinson <[email protected]>
mdickinson added a commit that referenced this pull request Aug 11, 2022
…ace (GH-95665) (GH-95858)

This PR fixes the error message from float(s) in the case where s contains only whitespace.
(cherry picked from commit 97e9cfa)

Co-authored-by: Mark Dickinson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The ValueError for converting an all-whitespace string to a float misleadingly displays it as the empty string

4 participants