[issue3404] wrong precision in float formatting or doc error

2008-07-18 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: Fixed docs in r65099. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue3404] wrong precision in float formatting or doc error

2008-07-18 Thread Hagen Fürstenau
Hagen Fürstenau <[EMAIL PROTECTED]> added the comment: Just found it documented for the % operator: There precision is number of digits before and after decimal point for format "g". But then the documentation for 2.6 is wrong: "The precision is a decimal number indicating how many digits shou

[issue3404] wrong precision in float formatting

2008-07-18 Thread Hagen Fürstenau
New submission from Hagen Fürstenau <[EMAIL PROTECTED]>: This seems to be wrong: >>> "{0:.2}".format(1.2345) '1.2' The same happens for format specifiers "g" and "n", but not for "f": >>> "{0:.2f}".format(1.2345) '1.23' With empty format specifier it can even get really wrong: >>> "{0:.1}".f