Mark Dickinson <dicki...@gmail.com> added the comment:

Hmm. I'm not sure that it ever got documented properly. There may still be an 
open documentation issue somewhere.

There's not really much wiggle-room for changing the implementation: the 
behaviour of the "g" formatting for Decimal objects is following the 
specification of "to-scientific-string" from the Decimal Arithmetic spec that 
the decimal module is based on: 
http://speleotrove.com/decimal/daconvs.html#reftostr

One of the principles articulated there is that to-scientific-string should be 
faithful, so that conversion to string and back doesn't lose any information. 
That precludes chopping significant trailing zeros.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42429>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to