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 eric.smith
Recipients cjwelborn, docs@python, eric.smith, jluscher
Date 2015-05-25.18:40:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432579243.47.0.0930994529891.issue24281@psf.upfronthosting.co.za>
In-reply-to
Content
Just to clarify:

If not specified, the default "presentation type" for floats is "g". Since you didn't specify "f" in your example, it's using "g". For presentation type "g", the precision (3 in your case) is the total number of significant digits. So 12.34 first becomes 12.3, then that's displayed in a field 8 characters wide, which gives you the 4 leading zeros.

See the section of presentation types for floating point at the end of this section:
https://docs.python.org/2/library/string.html#format-specification-mini-language
History
Date User Action Args
2015-05-25 18:40:43eric.smithsetrecipients: + eric.smith, docs@python, cjwelborn, jluscher
2015-05-25 18:40:43eric.smithsetmessageid: <1432579243.47.0.0930994529891.issue24281@psf.upfronthosting.co.za>
2015-05-25 18:40:43eric.smithlinkissue24281 messages
2015-05-25 18:40:43eric.smithcreate