Skip to content

implementing n string format codes for float types #4456

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

Closed
wants to merge 4 commits into from
Closed

implementing n string format codes for float types #4456

wants to merge 4 commits into from

Conversation

notJoon
Copy link
Contributor

@notJoon notJoon commented Jan 16, 2023

contribute to #1656

>>> print('{:.n}'.format(-9000000.0))

# before

Traceback (most recent call last):
  File "<wasm>", line 1, in <module>
ValueError: Format code 'n' for object of type 'float' not implemented yet

# after

-9e+06

@notJoon notJoon marked this pull request as draft January 16, 2023 01:51
@notJoon notJoon closed this Jan 16, 2023
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