diff options
author | Guido van Rossum <guido@python.org> | 2003-04-15 12:43:26 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-04-15 12:43:26 (GMT) |
commit | 28e83e3a668c9098595c858aae04d69022306fdb (patch) | |
tree | 8ac1d021a3cb5c2851a05ee569158ae2af305fd1 /Python/bltinmodule.c | |
parent | b1ded1e508d67acfb71450b353d0939e991cb288 (diff) | |
download | cpython-28e83e3a668c9098595c858aae04d69022306fdb.zip cpython-28e83e3a668c9098595c858aae04d69022306fdb.tar.gz cpython-28e83e3a668c9098595c858aae04d69022306fdb.tar.bz2 |
Some errors from range() should be TypeError, not ValueError.
Diffstat (limited to 'Python/bltinmodule.c')
-rw-r--r-- | Python/bltinmodule.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index aeb2d53..adefba2 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -1367,21 +1367,21 @@ handle_range_longs(PyObject *self, PyObject *args) } if (!PyInt_Check(ilow) && !PyLong_Check(ilow)) { - PyErr_Format(PyExc_ValueError, + PyErr_Format(PyExc_TypeError, "integer start argument expected, got %s.", ilow->ob_type->tp_name); goto Fail; } if (!PyInt_Check(ihigh) && !PyLong_Check(ihigh)) { - PyErr_Format(PyExc_ValueError, + PyErr_Format(PyExc_TypeError, "integer end argument expected, got %s.", ihigh->ob_type->tp_name); goto Fail; } if (!PyInt_Check(istep) && !PyLong_Check(istep)) { - PyErr_Format(PyExc_ValueError, + PyErr_Format(PyExc_TypeError, "integer step argument expected, got %s.", istep->ob_type->tp_name); goto Fail; |