[Python-checkins] r77550 - python/trunk/Lib/test/test_strtod.py
mark.dickinson
python-checkins at python.org
Sat Jan 16 21:33:03 CET 2010
Author: mark.dickinson
Date: Sat Jan 16 21:33:02 2010
New Revision: 77550
Log:
Add better error reporting for MemoryErrors caused by str->float conversions.
Modified:
python/trunk/Lib/test/test_strtod.py
Modified: python/trunk/Lib/test/test_strtod.py
==============================================================================
--- python/trunk/Lib/test/test_strtod.py (original)
+++ python/trunk/Lib/test/test_strtod.py Sat Jan 16 21:33:02 2010
@@ -91,6 +91,8 @@
fs = float(s)
except OverflowError:
got = '-inf' if s[0] == '-' else 'inf'
+ except MemoryError:
+ got = 'memory error'
else:
got = fs.hex()
expected = strtod(s)
More information about the Python-checkins
mailing list