Skip to content

Implement float format validation #4419

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

Merged
merged 3 commits into from
Jan 4, 2023

Conversation

yt2b
Copy link
Contributor

@yt2b yt2b commented Jan 4, 2023

Float Format validation is not implemented.

>>>>> f"{1.0:,o}"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Unknown format code 'o' for object of type 'float'

The output should be raised ValueError: Cannot specify ',' with 'o'.
I've implemented format validation.

@yt2b yt2b marked this pull request as ready for review January 4, 2023 15:25
Copy link
Member

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

lgtm!

@DimitrisJim DimitrisJim merged commit 144f619 into RustPython:main Jan 4, 2023
@yt2b yt2b deleted the implement_float_format_validation branch January 4, 2023 23:46
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.

2 participants