diff options
author | Raymond Hettinger <python@rcn.com> | 2003-10-28 07:32:28 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-10-28 07:32:28 (GMT) |
commit | 0e4f76405d79e95abfdda21b9dfc10c7f32340e8 (patch) | |
tree | f1cab7fd2eb7b6da8dc09a8b182393117e9b4e25 | |
parent | 8476c4df925238b5b82a68a97445877c8260e364 (diff) | |
download | cpython-0e4f76405d79e95abfdda21b9dfc10c7f32340e8.zip cpython-0e4f76405d79e95abfdda21b9dfc10c7f32340e8.tar.gz cpython-0e4f76405d79e95abfdda21b9dfc10c7f32340e8.tar.bz2 |
Fix nits in error messages.
-rw-r--r-- | Modules/itertoolsmodule.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 7cafc14..be2d735 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -767,7 +767,7 @@ islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (PyErr_Occurred()) PyErr_Clear(); PyErr_SetString(PyExc_ValueError, - "Stop argument must be an integer or None."); + "Stop argument must be a non-negative integer or None."); return NULL; } } @@ -776,7 +776,7 @@ islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (start == -1 && PyErr_Occurred()) { PyErr_Clear(); PyErr_SetString(PyExc_ValueError, - "Start argument must be an integer."); + "Start argument must be a non-negative integer."); return NULL; } if (a2 != Py_None) { @@ -785,7 +785,7 @@ islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (PyErr_Occurred()) PyErr_Clear(); PyErr_SetString(PyExc_ValueError, - "Stop argument must be an integer or None."); + "Stop argument must be a non-negative integer or None."); return NULL; } } @@ -793,7 +793,7 @@ islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds) if (start<0 || stop<-1) { PyErr_SetString(PyExc_ValueError, - "Indices for islice() must be positive."); + "Indices for islice() must be non-negative integers."); return NULL; } |