Lorenz Mende <lorenz.me...@gmail.com> added the comment:

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.

----------
nosy: +LorenzMende

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

Reply via email to