summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2011-01-08 09:03:11 (GMT)
committerRaymond Hettinger <python@rcn.com>2011-01-08 09:03:11 (GMT)
commit0ab10e460089fcdb9131ab1bdbe92142a76a83f3 (patch)
tree01383a552ffbd52da81930f72e623a37183e29bf
parent23f9fc344827c02cf2450f7e0903681e69db201a (diff)
downloadcpython-0ab10e460089fcdb9131ab1bdbe92142a76a83f3.zip
cpython-0ab10e460089fcdb9131ab1bdbe92142a76a83f3.tar.gz
cpython-0ab10e460089fcdb9131ab1bdbe92142a76a83f3.tar.bz2
Issue #10813: Small improvement to decimal money format recipe.
-rw-r--r--Doc/library/decimal.rst3
1 files changed, 2 insertions, 1 deletions
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