The previous made the stop argument optional.

It is better to be explicit and just allow stop to be None.
This commit is contained in:
Raymond Hettinger 2003-05-02 19:44:20 +00:00
parent 14ef54cd83
commit 341deb74e7
3 changed files with 10 additions and 13 deletions

View file

@ -477,7 +477,7 @@ islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
isliceobject *lz;
numargs = PyTuple_Size(args);
if (!PyArg_ParseTuple(args, "O|OOl:islice", &seq, &a1, &a2, &step))
if (!PyArg_ParseTuple(args, "OO|Ol:islice", &seq, &a1, &a2, &step))
return NULL;
if (numargs == 2) {
@ -491,7 +491,7 @@ islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
return NULL;
}
}
} else if (numargs == 3 || numargs == 4) {
} else {
start = PyInt_AsLong(a1);
if (start == -1 && PyErr_Occurred()) {
PyErr_Clear();