[New-bugs-announce] [issue5772] For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent

Eric Smith report at bugs.python.org
Thu Apr 16 12:57:21 CEST 2009


New submission from Eric Smith <eric at trueblade.com>:

The point of the empty type code is to make sure a number looks like a
float (so as to avoid formatting 2.0 as "2"). But if we have an
exponent, the result already looks like a float, so there's no need to
modify the number further.

----------
assignee: eric.smith
components: Interpreter Core
keywords: easy
messages: 86021
nosy: eric.smith, marketdickinson
priority: normal
severity: normal
status: open
title: For float.__format__, don't add a trailing ".0" if we're using no type code and we have an exponent
type: behavior
versions: Python 2.7, Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5772>
_______________________________________


More information about the New-bugs-announce mailing list