From 0ab10e460089fcdb9131ab1bdbe92142a76a83f3 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sat, 8 Jan 2011 09:03:11 +0000 Subject: Issue #10813: Small improvement to decimal money format recipe. --- Doc/library/decimal.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/library/decimal.rst b/Doc/library/decimal.rst index 7c448e6..bf153ba 100644 --- a/Doc/library/decimal.rst +++ b/Doc/library/decimal.rst @@ -1657,7 +1657,8 @@ to work with the :class:`Decimal` class:: build(trailneg) for i in range(places): build(next() if digits else '0') - build(dp) + if places: + build(dp) if not digits: build('0') i = 0 -- cgit v0.12