Mercurial > cpython-lru_cache-weakref
diff Python/bltinmodule.c @ 28612:0792caa6371c legacy-trunk
Some errors from range() should be TypeError, not ValueError.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Tue, 15 Apr 2003 12:43:26 +0000 |
| parents | eee4969adbae |
| children | 13d0a3c4e465 |
line wrap: on
line diff
--- a/Python/bltinmodule.c Tue Apr 15 11:10:33 2003 +0000 +++ b/Python/bltinmodule.c Tue Apr 15 12:43:26 2003 +0000 @@ -1367,21 +1367,21 @@ } 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;
