]> granicus.if.org Git - python/commitdiff
In response to one particular complaint on edu-sig, change some error
authorGuido van Rossum <guido@python.org>
Tue, 15 Feb 2000 14:51:46 +0000 (14:51 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 15 Feb 2000 14:51:46 +0000 (14:51 +0000)
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. :-)

Objects/intobject.c

index 00fdf826c519649eefa87fd32475e354dc61a617..4f408cf14bb7d68dbfd7f3e42e8753d94ae5df51 100644 (file)
@@ -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