mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Fix typo in complex parsing code; expand tests.
This commit is contained in:
parent
5083dc552b
commit
0a6501bf56
2 changed files with 20 additions and 4 deletions
|
@ -962,7 +962,7 @@ complex_subtype_from_string(PyTypeObject *type, PyObject *v)
|
|||
y = PyOS_ascii_strtod(s, &end);
|
||||
if (end == s && errno == ENOMEM)
|
||||
return PyErr_NoMemory();
|
||||
if (errno == ERANGE && fabs(z) >= 1.0)
|
||||
if (errno == ERANGE && fabs(y) >= 1.0)
|
||||
goto overflow;
|
||||
if (end != s)
|
||||
/* <float><signed-float>j */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue