Author LorenzMende
Recipients LorenzMende, docs@python, ezio.melotti, ikelly, mark.dickinson, skrah, tuomas.suutari
Date 2018-09-02.08:02:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1535875344.18.0.56676864532.issue23460@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2018-09-02 08:02:24LorenzMendesetrecipients: + LorenzMende, mark.dickinson, ikelly, ezio.melotti, skrah, docs@python, tuomas.suutari
2018-09-02 08:02:24LorenzMendesetmessageid: <1535875344.18.0.56676864532.issue23460@psf.upfronthosting.co.za>
2018-09-02 08:02:24LorenzMendelinkissue23460 messages
2018-09-02 08:02:23LorenzMendecreate