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 Christian.Iversen, docs@python, mark.dickinson
Date 2011-11-19.13:26:22
SpamBayes Score 0.001722031
Marked as misclassified No
Message-id <1321709184.04.0.466428984851.issue13433@psf.upfronthosting.co.za>
In-reply-to
Content
Yep, there's an oddity here that's directly inherited from C's sprintf family of functions, namely that in %e-style formatting you give the number of digits after the point (= one less than the total number of significant digits), and in %g-style formatting you give the total number of significant digits instead.

Can you give a pointer, or link, to the documentation section you were looking at?

The description at:

http://docs.python.org/library/stdtypes.html#string-formatting-operations

looks fine to me.  Note 3, which relates to the '%e' and '%f'-style formatting, talks about number of places after the point.  Note 4, which relates to '%g' formatting, talks about the total number of significant digits.
History
Date User Action Args
2011-11-19 13:26:24mark.dickinsonsetrecipients: + mark.dickinson, docs@python, Christian.Iversen
2011-11-19 13:26:24mark.dickinsonsetmessageid: <1321709184.04.0.466428984851.issue13433@psf.upfronthosting.co.za>
2011-11-19 13:26:23mark.dickinsonlinkissue13433 messages
2011-11-19 13:26:22mark.dickinsoncreate