summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorStefan Krah <skrah@bytereef.org>2013-05-29 13:47:24 (GMT)
committerStefan Krah <skrah@bytereef.org>2013-05-29 13:47:24 (GMT)
commit8d90e383a3517a13d752625231584967397d8ba2 (patch)
treee3611a5db7631fa3865c3d4b36ed7637406dc52c /Lib
parent6b3026ce7299056a3f10b25426cda34d771857ac (diff)
parent6edda14b2968ca07b94a2fdde4dd43215222fcd8 (diff)
downloadcpython-8d90e383a3517a13d752625231584967397d8ba2.zip
cpython-8d90e383a3517a13d752625231584967397d8ba2.tar.gz
cpython-8d90e383a3517a13d752625231584967397d8ba2.tar.bz2
Merge 3.3.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/decimal.py2
-rw-r--r--Lib/test/test_decimal.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/Lib/decimal.py b/Lib/decimal.py
index 25f8fbc..d39ac1d 100644
--- a/Lib/decimal.py
+++ b/Lib/decimal.py
@@ -6138,7 +6138,7 @@ _parse_format_specifier_regex = re.compile(r"""\A
(?:\.(?P<precision>0|(?!0)\d+))?
(?P<type>[eEfFgGn%])?
\Z
-""", re.VERBOSE)
+""", re.VERBOSE|re.DOTALL)
del re
diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py
index 7fcd2a8..7dd287e 100644
--- a/Lib/test/test_decimal.py
+++ b/Lib/test/test_decimal.py
@@ -1020,6 +1020,10 @@ class FormatTest(unittest.TestCase):
('/=10', '-45.6', '-/////45.6'),
('/=+10', '45.6', '+/////45.6'),
('/= 10', '45.6', ' /////45.6'),
+ ('\x00=10', '-inf', '-\x00Infinity'),
+ ('\x00^16', '-inf', '\x00\x00\x00-Infinity\x00\x00\x00\x00'),
+ ('\x00>10', '1.2345', '\x00\x00\x00\x001.2345'),
+ ('\x00<10', '1.2345', '1.2345\x00\x00\x00\x00'),
# thousands separator
(',', '1234567', '1,234,567'),