Message324473
I want to bring this issue up again.
As the others correctly stated, either the documentation or the implementation of Decimal 'g' formatting is incorrect.
For floats the implementation suits the docu:
>>> '{:g}'.format(0.00001)
'1e-05'
For decimals:
>>> '{:g}'.format(decimal.Decimal('0.00001'))
'0.00001'
As there is a deviation between documentation and implementation, I advise to modify one of both. |
|
Date |
User |
Action |
Args |
2018-09-02 08:02:24 | LorenzMende | set | recipients:
+ LorenzMende, mark.dickinson, ikelly, ezio.melotti, skrah, docs@python, tuomas.suutari |
2018-09-02 08:02:24 | LorenzMende | set | messageid: <1535875344.18.0.56676864532.issue23460@psf.upfronthosting.co.za> |
2018-09-02 08:02:24 | LorenzMende | link | issue23460 messages |
2018-09-02 08:02:23 | LorenzMende | create | |
|