From 6b1e43b7bcbb85bd042d824e957971392d62beb7 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Wed, 20 May 2009 18:41:04 +0000 Subject: Issue #5829: complex('1e500') shouldn't raise OverflowError --- Objects/complexobject.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Objects/complexobject.c') diff --git a/Objects/complexobject.c b/Objects/complexobject.c index b904cc47c1..30d8b5216e 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 */ - 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 == '-') { /* j | 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(); -- cgit v1.2.1