[issue7098] g formatting for decimal types should always strip trailing zeros.

Mark Dickinson report at bugs.python.org
Sat Oct 10 21:28:52 CEST 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

> It should strip all trailing zeros from the result:

Hmm.  Thinking about this some more, I don't think this is true:  format() shouldn't be throwing away significant information (in Decimal 
the number of trailing zeros *is* significant information) unless that's 
necessary to fit the result into the given precision.

So I think the current code is correct.

However, we could do with documenting the precise rules being used for 
Decimal formatting somewhere.

----------

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


More information about the Python-bugs-list mailing list