Implement float format validation by yt2b · Pull Request #4419 · RustPython/RustPython · GitHub
Skip to content

Implement float format validation - #4419

Merged
DimitrisJim merged 3 commits into
RustPython:mainfrom
yt2b:implement_float_format_validation
Jan 4, 2023
Merged

DimitrisJim merged 3 commits into
RustPython:mainfrom
yt2b:implement_float_format_validation

Conversation

@yt2b

@yt2b yt2b commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

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

@DimitrisJim DimitrisJim left a comment

Copy link
Copy Markdown
Member

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