diff options
author | Guido van Rossum <guido@python.org> | 1999-01-10 16:56:58 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-01-10 16:56:58 (GMT) |
commit | 031d0e5feb208e79cf1634db7d9d17148be7ba10 (patch) | |
tree | 3bfaff1fd7353cfe57981a1ad8217f445fb5535a | |
parent | 0bdbe6c5f0dffa72cb885a5a6bb60707c67013b2 (diff) | |
download | cpython-031d0e5feb208e79cf1634db7d9d17148be7ba10.zip cpython-031d0e5feb208e79cf1634db7d9d17148be7ba10.tar.gz cpython-031d0e5feb208e79cf1634db7d9d17148be7ba10.tar.bz2 |
Patch by Charles Waldman -- remove unneeded and even harmful test for
float to the negative power (which is already and better done in
floatobject.c.)
-rw-r--r-- | Objects/abstract.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 288c3cb..be986f5 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -586,16 +586,6 @@ do_pow(v, w) "pow(x, y) requires numeric arguments"); return NULL; } - if ( -#ifndef WITHOUT_COMPLEX - !PyComplex_Check(v) && -#endif - PyFloat_Check(w) && PyFloat_AsDouble(v) < 0.0) { - if (!PyErr_Occurred()) - PyErr_SetString(PyExc_ValueError, - "negative number to float power"); - return NULL; - } if (PyNumber_Coerce(&v, &w) != 0) return NULL; if ((f = v->ob_type->tp_as_number->nb_power) != NULL) |