summaryrefslogtreecommitdiffstats
path: root/Objects/intobject.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-09-05 06:24:58 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-09-05 06:24:58 (GMT)
commit4c483c4d8eac8603ff299adbd373e4f14da61ff9 (patch)
tree46def41f169f5e0c2faebdc7e79197cb37a5e3ad /Objects/intobject.c
parentd893fd68bd8a7be8e0ceb17e3b9ea810de5820e0 (diff)
downloadcpython-4c483c4d8eac8603ff299adbd373e4f14da61ff9.zip
cpython-4c483c4d8eac8603ff299adbd373e4f14da61ff9.tar.gz
cpython-4c483c4d8eac8603ff299adbd373e4f14da61ff9.tar.bz2
Make the error msgs in our pow() implementations consistent.
Diffstat (limited to 'Objects/intobject.c')
-rw-r--r--Objects/intobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c
index 73d5e77..12edb51 100644
--- a/Objects/intobject.c
+++ b/Objects/intobject.c
@@ -589,8 +589,8 @@ int_pow(PyIntObject *v, PyIntObject *w, PyIntObject *z)
CONVERT_TO_LONG(w, iw);
if (iw < 0) {
if ((PyObject *)z != Py_None) {
- PyErr_SetString(PyExc_TypeError, "integer pow() arg "
- "3 must not be specified when arg 2 is < 0");
+ PyErr_SetString(PyExc_TypeError, "pow() 2nd argument "
+ "cannot be negative when 3rd argument specified");
return NULL;
}
/* Return a float. This works because we know that
@@ -603,7 +603,7 @@ int_pow(PyIntObject *v, PyIntObject *w, PyIntObject *z)
CONVERT_TO_LONG(z, iz);
if (iz == 0) {
PyErr_SetString(PyExc_ValueError,
- "pow() arg 3 cannot be 0");
+ "pow() 3rd argument cannot be 0");
return NULL;
}
}