Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 4009:61106986a1a4 legacy-trunk
Don't test here for negative number to float power; that belongs in
floatobject.c.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 16 Aug 1996 20:49:17 +0000 |
| parents | 138fa15a1032 |
| children | f41f0caf1cfc |
line wrap: on
line diff
--- a/Python/ceval.c Fri Aug 16 20:44:34 1996 +0000 +++ b/Python/ceval.c Fri Aug 16 20:49:17 1996 +0000 @@ -2282,15 +2282,6 @@ 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);
