diff options
Diffstat (limited to 'Doc/library/decimal.rst')
-rw-r--r-- | Doc/library/decimal.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index 04433c1..33aa42c 100644 --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -1374,7 +1374,7 @@ to work with the :class:`Decimal` class:: >>> moneyfmt(Decimal(123456789), sep=' ') '123 456 789.00' >>> moneyfmt(Decimal('-0.02'), neg='<', trailneg='>') - '<.02>' + '<0.02>' """ q = Decimal(10) ** -places # 2 places --> '0.01' @@ -1387,6 +1387,8 @@ to work with the :class:`Decimal` class:: for i in range(places): build(next() if digits else '0') build(dp) + if not digits: + build('0') i = 0 while digits: build(next()) |