[issue7094] Add alternate float formatting styles to new-style formatting.

Mark Dickinson report at bugs.python.org
Sun Nov 21 20:26:38 CET 2010


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

I haven't done a full review, but this looks good at first glance.

For '#g' formatting on the Decimal type, I wonder whether the patch gives the right semantics.  E.g., should

   format(Decimal('1.23'), '#.6g')

give '1.23' or '1.23000'?  For the float type, the '#.<precision>g' formatting has the property that <precision> digits are always returned, and I think this may be what we want here.  I'm not sure, though.

----------

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


More information about the Python-bugs-list mailing list