New submission from Aaron Meurer <asmeu...@gmail.com>:

>>> '{:+.19e}'.format(0.)
'+0.0000000000000000000e+00'
>>> import decimal
>>> '{:+.19e}'.format(decimal.Decimal(0))
'+0.0000000000000000000e+19'

Note the decimal uses e+19 instead of e+00. Obviously it's still mathematically 
correct, but it's annoying to have anything other than e+00 for a 0 value.

----------
messages: 303653
nosy: Aaron.Meurer
priority: normal
severity: normal
status: open
title: Scientific formatting of decimal 0 different from float 0

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

Reply via email to