summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-05-20 18:41:04 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-05-20 18:41:04 (GMT)
commit6b1e43b7bcbb85bd042d824e957971392d62beb7 (patch)
treea9fcbc22f9463837d9c936935c7ef36bcd1cbdd9 /Objects
parente2e1561a15c76bc9089248ab63c9ac74325e13da (diff)
downloadcpython-6b1e43b7bcbb85bd042d824e957971392d62beb7.zip
cpython-6b1e43b7bcbb85bd042d824e957971392d62beb7.tar.gz
cpython-6b1e43b7bcbb85bd042d824e957971392d62beb7.tar.bz2
Issue #5829: complex('1e500') shouldn't raise OverflowError
Diffstat (limited to 'Objects')
-rw-r--r--Objects/complexobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index b904cc4..30d8b52 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -799,7 +799,7 @@ complex_subtype_from_string(PyTypeObject *type, PyObject *v)
*/
/* first look for forms starting with <float> */
- z = PyOS_string_to_double(s, &end, PyExc_OverflowError);
+ z = PyOS_string_to_double(s, &end, NULL);
if (z == -1.0 && PyErr_Occurred()) {
if (PyErr_ExceptionMatches(PyExc_ValueError))
PyErr_Clear();
@@ -812,7 +812,7 @@ complex_subtype_from_string(PyTypeObject *type, PyObject *v)
if (*s == '+' || *s == '-') {
/* <float><signed-float>j | <float><sign>j */
x = z;
- y = PyOS_string_to_double(s, &end, PyExc_OverflowError);
+ y = PyOS_string_to_double(s, &end, NULL);
if (y == -1.0 && PyErr_Occurred()) {
if (PyErr_ExceptionMatches(PyExc_ValueError))
PyErr_Clear();