Kaydet (Commit) bf51afa0 authored tarafından Guido van Rossum's avatar Guido van Rossum

Don't test here for negative number to float power; that belongs in

floatobject.c.
üst 79d96d6b
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment