summaryrefslogtreecommitdiffstats
path: root/Lib/decimal.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-09-07 16:21:56 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-09-07 16:21:56 (GMT)
commit7718d2bfb040efb63f5fa90691efb295ef962cb2 (patch)
tree7a46c73af9c296ea16439579274a96608bf46b67 /Lib/decimal.py
parentd9ee87a43d1cc0f3d5e65fc6ed30c12c52ef58a0 (diff)
downloadcpython-7718d2bfb040efb63f5fa90691efb295ef962cb2.zip
cpython-7718d2bfb040efb63f5fa90691efb295ef962cb2.tar.gz
cpython-7718d2bfb040efb63f5fa90691efb295ef962cb2.tar.bz2
Merged revisions 74704 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r74704 | mark.dickinson | 2009-09-07 17:17:41 +0100 (Mon, 07 Sep 2009) | 3 lines Issue #6850: Fix bug in Decimal._parse_format_specifier for formats with no type specifier. ........
Diffstat (limited to 'Lib/decimal.py')
-rw-r--r--Lib/decimal.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 8d82cb9..e3af3f0 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -5592,7 +5592,7 @@ def _parse_format_specifier(format_spec, _localeconv=None):
# if format type is 'g' or 'G' then a precision of 0 makes little
# sense; convert it to 1. Same if format type is unspecified.
if format_dict['precision'] == 0:
- if format_dict['type'] in 'gG' or format_dict['type'] is None:
+ if format_dict['type'] is None or format_dict['type'] in 'gG':
format_dict['precision'] = 1
# determine thousands separator, grouping, and decimal separator, and