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

handle exponents when converting str to float #891

Merged
merged 8 commits into from
Nov 25, 2024

Conversation

jjallaire
Copy link
Collaborator

Resolves #848 so the e.g. following will now be handled:

@jjallaire
Copy link
Collaborator Author

@evanmiller-anthropic Let us know if you agree w/ handling this way.

@evanmiller-anthropic
Copy link
Contributor

I think this makes sense! One caveat is that isnumeric also considers fractional Unicode code points to be numeric (½, ¾, etc). You may want to handle this case somehow (at least not throw a ValueError), but I haven't seen them in practice.

@jjallaire
Copy link
Collaborator Author

Okay, thx! I am going to merge this as-is and have filed an issue for the fractional code points: #897

@jjallaire-aisi jjallaire-aisi merged commit 0a0532a into main Nov 25, 2024
9 checks passed
@jjallaire-aisi jjallaire-aisi deleted the bugfix/float-exponents branch November 25, 2024 14:01
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.

normalize_number fails on exponent / fractional input
4 participants