]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch by Charles Waldman -- remove unneeded and even harmful test for
authorGuido van Rossum <guido@python.org>
Sun, 10 Jan 1999 16:56:58 +0000 (16:56 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 10 Jan 1999 16:56:58 +0000 (16:56 +0000)
float to the negative power (which is already and better done in
floatobject.c.)

Objects/abstract.c

index 288c3cb2d93dc30c93943b214aa438cbb1a91c8c..be986f5fde7bd3efe845d3a29282b4823f600c50 100644 (file)
@@ -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)