@@ -618,6 +618,9 @@ cycle_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
618618 PyObject * saved ;
619619 cycleobject * lz ;
620620
621+ if (!_PyArg_NoKeywords ("cycle()" , kwds ))
622+ return NULL ;
623+
621624 if (!PyArg_UnpackTuple (args , "cycle" , 1 , 1 , & iterable ))
622625 return NULL ;
623626
@@ -765,6 +768,9 @@ dropwhile_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
765768 PyObject * it ;
766769 dropwhileobject * lz ;
767770
771+ if (!_PyArg_NoKeywords ("dropwhile()" , kwds ))
772+ return NULL ;
773+
768774 if (!PyArg_UnpackTuple (args , "dropwhile" , 2 , 2 , & func , & seq ))
769775 return NULL ;
770776
@@ -906,6 +912,9 @@ takewhile_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
906912 PyObject * it ;
907913 takewhileobject * lz ;
908914
915+ if (!_PyArg_NoKeywords ("takewhile()" , kwds ))
916+ return NULL ;
917+
909918 if (!PyArg_UnpackTuple (args , "takewhile" , 2 , 2 , & func , & seq ))
910919 return NULL ;
911920
@@ -1048,6 +1057,9 @@ islice_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
10481057 int numargs ;
10491058 isliceobject * lz ;
10501059
1060+ if (!_PyArg_NoKeywords ("islice()" , kwds ))
1061+ return NULL ;
1062+
10511063 if (!PyArg_UnpackTuple (args , "islice" , 2 , 4 , & seq , & a1 , & a2 , & a3 ))
10521064 return NULL ;
10531065
@@ -1236,6 +1248,9 @@ starmap_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
12361248 PyObject * it ;
12371249 starmapobject * lz ;
12381250
1251+ if (!_PyArg_NoKeywords ("starmap()" , kwds ))
1252+ return NULL ;
1253+
12391254 if (!PyArg_UnpackTuple (args , "starmap" , 2 , 2 , & func , & seq ))
12401255 return NULL ;
12411256
@@ -1365,6 +1380,9 @@ imap_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
13651380 imapobject * lz ;
13661381 int numargs , i ;
13671382
1383+ if (!_PyArg_NoKeywords ("imap()" , kwds ))
1384+ return NULL ;
1385+
13681386 numargs = PyTuple_Size (args );
13691387 if (numargs < 2 ) {
13701388 PyErr_SetString (PyExc_TypeError ,
@@ -1544,6 +1562,9 @@ chain_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
15441562 int i ;
15451563 PyObject * ittuple ;
15461564
1565+ if (!_PyArg_NoKeywords ("chain()" , kwds ))
1566+ return NULL ;
1567+
15471568 /* obtain iterators */
15481569 assert (PyTuple_Check (args ));
15491570 ittuple = PyTuple_New (tuplesize );
@@ -1684,6 +1705,9 @@ ifilter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
16841705 PyObject * it ;
16851706 ifilterobject * lz ;
16861707
1708+ if (!_PyArg_NoKeywords ("ifilter()" , kwds ))
1709+ return NULL ;
1710+
16871711 if (!PyArg_UnpackTuple (args , "ifilter" , 2 , 2 , & func , & seq ))
16881712 return NULL ;
16891713
@@ -1825,6 +1849,9 @@ ifilterfalse_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
18251849 PyObject * it ;
18261850 ifilterfalseobject * lz ;
18271851
1852+ if (!_PyArg_NoKeywords ("ifilterfalse()" , kwds ))
1853+ return NULL ;
1854+
18281855 if (!PyArg_UnpackTuple (args , "ifilterfalse" , 2 , 2 , & func , & seq ))
18291856 return NULL ;
18301857
@@ -1964,6 +1991,9 @@ count_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
19641991 countobject * lz ;
19651992 long cnt = 0 ;
19661993
1994+ if (!_PyArg_NoKeywords ("count()" , kwds ))
1995+ return NULL ;
1996+
19671997 if (!PyArg_ParseTuple (args , "|l:count" , & cnt ))
19681998 return NULL ;
19691999
@@ -2060,6 +2090,9 @@ izip_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
20602090 PyObject * result ;
20612091 int tuplesize = PySequence_Length (args );
20622092
2093+ if (!_PyArg_NoKeywords ("izip()" , kwds ))
2094+ return NULL ;
2095+
20632096 /* args must be a tuple */
20642097 assert (PyTuple_Check (args ));
20652098
@@ -2240,6 +2273,9 @@ repeat_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
22402273 PyObject * element ;
22412274 long cnt = -1 ;
22422275
2276+ if (!_PyArg_NoKeywords ("repeat()" , kwds ))
2277+ return NULL ;
2278+
22432279 if (!PyArg_ParseTuple (args , "O|l:repeat" , & element , & cnt ))
22442280 return NULL ;
22452281
0 commit comments