Commit 1d5e80cb authored by Guido van Rossum's avatar Guido van Rossum

This was the reason a numeric array to a real power was not working.

parent 2771359d
...@@ -463,7 +463,8 @@ do_pow(v, w) ...@@ -463,7 +463,8 @@ do_pow(v, w)
"pow() requires numeric arguments"); "pow() requires numeric arguments");
return NULL; return NULL;
} }
if (PyFloat_Check(w) && PyFloat_AsDouble(v) < 0.0) { if (PyFloat_Check(v) && PyFloat_Check(w) &&
PyFloat_AsDouble(v) < 0.0) {
if (!PyErr_Occurred()) if (!PyErr_Occurred())
PyErr_SetString(PyExc_ValueError, PyErr_SetString(PyExc_ValueError,
"negative number to float power"); "negative number to float power");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment