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}".format(1.2345)
'1.0'

----------
components: Interpreter Core
messages: 69947
nosy: hagen
severity: normal
status: open
title: wrong precision in float formatting
type: behavior
versions: Python 2.6, Python 3.0

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3404>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to