[Python-checkins] python/dist/src/Modules itertoolsmodule.c,1.11,1.12
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
2003年5月02日 12:44:22 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv25408/Modules
Modified Files:
itertoolsmodule.c
Log Message:
The previous made the stop argument optional.
It is better to be explicit and just allow stop to be None.
Index: itertoolsmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/itertoolsmodule.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** itertoolsmodule.c 2 May 2003 19:04:37 -0000 1.11
--- itertoolsmodule.c 2 May 2003 19:44:20 -0000 1.12
***************
*** 478,482 ****
numargs = PyTuple_Size(args);
! if (!PyArg_ParseTuple(args, "O|OOl:islice", &seq, &a1, &a2, &step))
return NULL;
--- 478,482 ----
numargs = PyTuple_Size(args);
! if (!PyArg_ParseTuple(args, "OO|Ol:islice", &seq, &a1, &a2, &step))
return NULL;
***************
*** 492,496 ****
}
}
! } else if (numargs == 3 || numargs == 4) {
start = PyInt_AsLong(a1);
if (start == -1 && PyErr_Occurred()) {
--- 492,496 ----
}
}
! } else {
start = PyInt_AsLong(a1);
if (start == -1 && PyErr_Occurred()) {