Kaydet (Commit) f7d590c9 authored tarafından Guido van Rossum's avatar Guido van Rossum

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

üst 88c6bdf0
...@@ -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