Message391793
This is by design, and documented under the "sign" section here: https://docs.python.org/3/library/string.html#format-specification-mini-language
The space before ".2f" is an instruction to leave space for a sign, "-" for a negative number and " " for a positive number. To avoid that space, use a format of ".2f" instead of " .2f".
>>> format(15, ".2f")
'15.00'
>>> format(15, " .2f")
' 15.00'
>>> format(15, "+.2f")
'+15.00' |
|
Date |
User |
Action |
Args |
2021-04-24 19:14:44 | mark.dickinson | set | recipients:
+ mark.dickinson, eric.smith, Axeinator |
2021-04-24 19:14:44 | mark.dickinson | set | messageid: <1619291684.29.0.682370089739.issue43932@roundup.psfhosted.org> |
2021-04-24 19:14:44 | mark.dickinson | link | issue43932 messages |
2021-04-24 19:14:44 | mark.dickinson | create | |
|