Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ab10e4

Browse files
committed
Issue #10813: Small improvement to decimal money format recipe.
1 parent 23f9fc3 commit 0ab10e4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Doc/library/decimal.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,8 @@ to work with the :class:`Decimal` class::
16571657
build(trailneg)
16581658
for i in range(places):
16591659
build(next() if digits else '0')
1660-
build(dp)
1660+
if places:
1661+
build(dp)
16611662
if not digits:
16621663
build('0')
16631664
i = 0

0 commit comments

Comments
 (0)