Mercurial > cpython-lru_cache-weakref
diff Modules/itertoolsmodule.c @ 30246:97f3d66558fb 2.3
* Add news item for the previous bugfix
* Backport itertoolsmodule.c 1.19 to re-sync Py2.3.1 with Py2.4.
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Sat, 30 Aug 2003 22:16:59 +0000 |
| parents | 3fb3747ce304 |
| children | 50708b8f0d28 |
line wrap: on
line diff
--- a/Modules/itertoolsmodule.c Sat Aug 30 14:52:35 2003 +0000 +++ b/Modules/itertoolsmodule.c Sat Aug 30 22:16:59 2003 +0000 @@ -1510,12 +1510,6 @@ PyObject *result; int tuplesize = PySequence_Length(args); - if (tuplesize < 1) { - PyErr_SetString(PyExc_TypeError, - "izip() requires at least one sequence"); - return NULL; - } - /* args must be a tuple */ assert(PyTuple_Check(args)); @@ -1599,6 +1593,8 @@ PyObject *item; PyObject *olditem; + if (tuplesize == 0) + return NULL; if (result->ob_refcnt == 1) { Py_INCREF(result); for (i=0 ; i < tuplesize ; i++) {
