This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients Axeinator, eric.smith, mark.dickinson
Date 2021-04-24.19:14:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619291684.29.0.682370089739.issue43932@roundup.psfhosted.org>
In-reply-to
Content
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'
History
Date User Action Args
2021-04-24 19:14:44mark.dickinsonsetrecipients: + mark.dickinson, eric.smith, Axeinator
2021-04-24 19:14:44mark.dickinsonsetmessageid: <1619291684.29.0.682370089739.issue43932@roundup.psfhosted.org>
2021-04-24 19:14:44mark.dickinsonlinkissue43932 messages
2021-04-24 19:14:44mark.dickinsoncreate