Mercurial > cpython-lru_cache-weakref
diff Modules/itertoolsmodule.c @ 30800:af443d820a50 legacy-trunk
Fix nits in error messages.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Tue, 28 Oct 2003 07:32:28 +0000 |
| parents | 225d848a5f96 |
| children | 3096fab2a19c |
line wrap: on
line diff
--- a/Modules/itertoolsmodule.c Mon Oct 27 20:00:36 2003 +0000 +++ b/Modules/itertoolsmodule.c Tue Oct 28 07:32:28 2003 +0000 @@ -767,7 +767,7 @@ 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 @@ 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 @@ 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 @@ 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; }
