diff options
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r-- | Objects/floatobject.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index c7bdbed..60dcca9 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -136,7 +136,7 @@ float_buf_repr(buf, v) for (; *cp != '\0'; cp++) { /* Any non-digit means it's not an integer; this takes care of NAN and INF as well. */ - if (!isdigit(*cp)) + if (!isdigit(Py_CHARMASK(*cp))) break; } if (*cp == '\0') { @@ -330,10 +330,6 @@ float_pow(v, w, z) } return newfloatobject(0.0); } - if (iv < 0.0) { - err_setstr(ValueError, "negative float to float power"); - return NULL; - } errno = 0; ix = pow(iv, iw); CHECK(ix); |