summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorAlex Martelli <aleaxit@gmail.com>2003-04-23 13:00:44 (GMT)
committerAlex Martelli <aleaxit@gmail.com>2003-04-23 13:00:44 (GMT)
commitf471d4783a54362c730fcd7e38ffb1d74af76f7a (patch)
treea9f2f94efac45fe898827979831eb32a1d265cf9 /Python
parent636688d470e4df7220e7f541a495155077cc0353 (diff)
downloadcpython-f471d4783a54362c730fcd7e38ffb1d74af76f7a.zip
cpython-f471d4783a54362c730fcd7e38ffb1d74af76f7a.tar.gz
cpython-f471d4783a54362c730fcd7e38ffb1d74af76f7a.tar.bz2
complete and clarify some error messages for range()
Diffstat (limited to 'Python')
-rw-r--r--Python/bltinmodule.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 6c1a3d2..bcc9a6c 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1368,21 +1368,21 @@ handle_range_longs(PyObject *self, PyObject *args)
if (!PyInt_Check(ilow) && !PyLong_Check(ilow)) {
PyErr_Format(PyExc_TypeError,
- "integer start argument expected, got %s.",
+ "range() integer start argument expected, got %s.",
ilow->ob_type->tp_name);
goto Fail;
}
if (!PyInt_Check(ihigh) && !PyLong_Check(ihigh)) {
PyErr_Format(PyExc_TypeError,
- "integer end argument expected, got %s.",
+ "range() integer end argument expected, got %s.",
ihigh->ob_type->tp_name);
goto Fail;
}
if (!PyInt_Check(istep) && !PyLong_Check(istep)) {
PyErr_Format(PyExc_TypeError,
- "integer step argument expected, got %s.",
+ "range() integer step argument expected, got %s.",
istep->ob_type->tp_name);
goto Fail;
}
@@ -1391,7 +1391,7 @@ handle_range_longs(PyObject *self, PyObject *args)
goto Fail;
if (cmp_result == 0) {
PyErr_SetString(PyExc_ValueError,
- "range() arg 3 must not be zero");
+ "range() step argument must not be zero");
goto Fail;
}
@@ -1507,7 +1507,7 @@ builtin_range(PyObject *self, PyObject *args)
}
if (istep == 0) {
PyErr_SetString(PyExc_ValueError,
- "range() arg 3 must not be zero");
+ "range() step argument must not be zero");
return NULL;
}
if (istep > 0)