]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Don't test here for negative number to float power; that belongs in
authorGuido van Rossum <guido@python.org>
Fri, 16 Aug 1996 20:49:17 +0000 (20:49 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 16 Aug 1996 20:49:17 +0000 (20:49 +0000)
floatobject.c.

Python/ceval.c

index 2520ea2cc3324f443f7c54506bebc4e08c176213..5c812c076b9808e2c4a4aae06f0159f14fc56e96 100644 (file)
@@ -2282,15 +2282,6 @@ powerop(v, w)
                err_setstr(TypeError, "pow() requires numeric arguments");
                return NULL;
        }
-       if (
-#ifndef WITHOUT_COMPLEX
-            !is_complexobject(v) && 
-#endif
-            is_floatobject(w) && getfloatvalue(v) < 0.0) {
-               if (!err_occurred())
-                   err_setstr(ValueError, "negative number to float power");
-               return NULL;
-       }
        if (coerce(&v, &w) != 0)
                return NULL;
        res = (*v->ob_type->tp_as_number->nb_power)(v, w, None);