[issue33731] string formatting that produces floats with preset precision while respecting locale
Eric V. Smith
report at bugs.python.org
Fri Jun 1 09:12:10 EDT 2018
Eric V. Smith <eric at trueblade.com> added the comment:
You can always use the locale module, although of course that's not as convenient:
>>> locale.format('%.2f', 1.891)
'1.89'
I'm open to suggests on backward compatible ways to implement this for python 3.8. It would probably involve a new letter, and need to be implemented for at least int, float, decimal, and complex.
----------
assignee: -> eric.smith
components: +Interpreter Core -Extension Modules
versions: +Python 3.8 -Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33731>
_______________________________________
More information about the Python-bugs-list
mailing list