Author r.david.murray
Recipients mmokrejs, r.david.murray
Date 2013-02-15.00:16:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
You appear to be mixing up % style formatting and 'format' style formatting, especially since you seem to be using both in your examples, which is redundant.

Please see for the explanation of the format method, including the % presentation type.

Your questions will probably be answered better and more thoroughly if you post to the python-lits mailing list (the tracker is not a place to get help, I'm afraid), but some quick hints:  In Python2.7, 1/10 is 0. In a 'format' format string you can get what it sounds like you want by doing this:

  >>> '{:.2f}%'.format(12.67777)

In % style formatting you would do

  >>> '%.2f%%' % 12.67777

This is all well documented, but if you can see places it could be clarified, please let us know.
Date User Action Args
2013-02-15 00:16:50r.david.murraysetrecipients: + r.david.murray, mmokrejs
2013-02-15 00:16:50r.david.murraysetmessageid: <>
2013-02-15 00:16:50r.david.murraylinkissue17207 messages
2013-02-15 00:16:50r.david.murraycreate