Message381666
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. |
|
Date |
User |
Action |
Args |
2020-11-23 12:56:33 | mark.dickinson | set | recipients:
+ mark.dickinson, eric.smith, Kwpolska |
2020-11-23 12:56:33 | mark.dickinson | set | messageid: <1606136193.37.0.500460817461.issue42429@roundup.psfhosted.org> |
2020-11-23 12:56:33 | mark.dickinson | link | issue42429 messages |
2020-11-23 12:56:32 | mark.dickinson | create | |
|