Benjamin-Loison / cpython

The Python programming language
https://www.python.org/
Other
0 stars 0 forks source link

Hide `.0` in something like `f'{1234.0:,}'` #44

Open Benjamin-Loison opened 2 days ago

Benjamin-Loison commented 2 days ago

Proposal:

# Add a code block here, if required

Note that hiding decimal part is equivalent in my case.

What is the name of this expression?

f'{1234.0:,}'
'1,234.0'

The aim is to plug with matplotlib y axis ticks. I could enforce labels of ticks but this is unwanted.

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response