commit | f7d590c93da411e635ff5cad4f697fb64a4833b7 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Fri Apr 03 23:38:59 1998 +0000 |
committer | Guido van Rossum <guido@python.org> | Fri Apr 03 23:38:59 1998 +0000 |
tree | b51ecb44402eea2141b48e903c8cd5eac89a411e | |
parent | 88c6bdf042623a6fb617ad7771b0f199f7a2eca2 [diff] [blame] |
This was the reason a numeric array to a real power was not working.
diff --git a/Objects/abstract.c b/Objects/abstract.c index 82eec95..0835fe3 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c
@@ -463,7 +463,8 @@ "pow() requires numeric arguments"); 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()) PyErr_SetString(PyExc_ValueError, "negative number to float power");