}
}
-static PyObject *
-cycle_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(cycle_doc,
"cycle(iterable) --> cycle object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)cycle_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)cycle_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
}
}
-static PyObject *
-dropwhile_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(dropwhile_doc,
"dropwhile(predicate, iterable) --> dropwhile object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)dropwhile_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)dropwhile_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
return NULL;
}
-static PyObject *
-takewhile_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(takewhile_doc,
"takewhile(predicate, iterable) --> takewhile object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)takewhile_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)takewhile_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
return item;
}
-static PyObject *
-islice_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(islice_doc,
"islice(iterable, [start,] stop [, step]) --> islice object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)islice_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)islice_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
return result;
}
-static PyObject *
-starmap_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(starmap_doc,
"starmap(function, sequence) --> starmap object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)starmap_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)starmap_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
return result;
}
-static PyObject *
-imap_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(imap_doc,
"imap(func, *iterables) --> imap object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)imap_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)imap_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
return NULL;
}
-static PyObject *
-chain_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(chain_doc,
"chain(*iterables) --> chain object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)chain_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)chain_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
}
}
-static PyObject *
-ifilter_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(ifilter_doc,
"ifilter(function or None, sequence) --> ifilter object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)ifilter_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)ifilter_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
}
}
-static PyObject *
-ifilterfalse_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(ifilterfalse_doc,
"ifilterfalse(function or None, sequence) --> ifilterfalse object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)ifilterfalse_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)ifilterfalse_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
return PyInt_FromLong(lz->cnt++);
}
-static PyObject *
-count_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(count_doc,
"count([firstval]) --> count object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)count_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)count_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
return result;
}
-static PyObject *
-izip_getiter(PyObject *lz)
-{
- Py_INCREF(lz);
- return lz;
-}
-
PyDoc_STRVAR(izip_doc,
"izip(iter1 [,iter2 [...]]) --> izip object\n\
\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)izip_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)izip_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */
return ro->element;
}
-static PyObject *
-repeat_getiter(PyObject *ro)
-{
- Py_INCREF(ro);
- return ro;
-}
-
PyDoc_STRVAR(repeat_doc,
"repeat(element [,times]) -> create an iterator which returns the element\n\
for the specified number of times. If not specified, returns the element\n\
0, /* tp_clear */
0, /* tp_richcompare */
0, /* tp_weaklistoffset */
- (getiterfunc)repeat_getiter, /* tp_iter */
+ PyObject_GenericGetIter, /* tp_iter */
(iternextfunc)repeat_next, /* tp_iternext */
0, /* tp_methods */
0, /* tp_members */