[issue5686] Float formatting with no type code produces incorrect output for exponential notation
Eric Smith
report at bugs.python.org
Sun Apr 5 15:26:39 CEST 2009
Eric Smith <eric at trueblade.com> added the comment:
This isn't testing what I thought it was testing. I'd forgotten that
format(x, '') is exactly equivalent to str(x).
The better test is using a format string of '<':
>>> 1e200.__format__('<')
'1.0e+200'
>>> 1e200.__format__('<g')
'1e+200'
So this is a non-issue: the current behavior matches the PEP
description. The online docs could still be tweaked, though.
----------
resolution: -> invalid
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5686>
_______________________________________
More information about the Python-bugs-list
mailing list