diff options
author | Guido van Rossum <guido@python.org> | 2000-02-15 14:51:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-02-15 14:51:46 (GMT) |
commit | fb4574e32055b4f336415dcf8dad0f01fc14b691 (patch) | |
tree | f6754fdc12956761bd53f1f523e808ce08f92177 /Objects/intobject.c | |
parent | 9e1cd688b5dad9c337092949b5adb2e65fb6a7d3 (diff) | |
download | cpython-fb4574e32055b4f336415dcf8dad0f01fc14b691.zip cpython-fb4574e32055b4f336415dcf8dad0f01fc14b691.tar.gz cpython-fb4574e32055b4f336415dcf8dad0f01fc14b691.tar.bz2 |
In response to one particular complaint on edu-sig, change some error
messages from "OverflowError: integer pow()" to "OverflowError:
integer exponentiation". (Not that this takes care of the complaint
in general that the error messages could be greatly improved. :-)
Diffstat (limited to 'Objects/intobject.c')
-rw-r--r-- | Objects/intobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c index 00fdf82..4f408cf 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -577,14 +577,14 @@ int_pow(v, w, z) if (temp == 0) break; /* Avoid ix / 0 */ if (ix / temp != prev) - return err_ovf("integer pow()"); + return err_ovf("integer exponentiation"); } iw >>= 1; /* Shift exponent down by 1 bit */ if (iw==0) break; prev = temp; temp *= temp; /* Square the value of temp */ if (prev!=0 && temp/prev!=prev) - return err_ovf("integer pow()"); + return err_ovf("integer exponentiation"); if (iz) { /* If we did a multiplication, perform a modulo */ ix = ix % iz; @@ -630,7 +630,7 @@ int_pow(v, w, z) if (iv == 0) break; /* 0 to some power -- avoid ix / 0 */ if (ix / iv != prev) - return err_ovf("integer pow()"); + return err_ovf("integer exponentiation"); } return PyInt_FromLong(ix); #endif |