@@ -31,7 +31,7 @@ pysqlite_cursor_init(PyObject *self, PyObject *args, PyObject *kwargs)
3131}
3232
3333PyDoc_STRVAR (pysqlite_cursor_execute__doc__ ,
34- "execute($self, sql, parameters=<unrepresentable> , /)\n"
34+ "execute($self, sql, parameters=() , /)\n"
3535"--\n"
3636"\n"
3737"Executes a SQL statement." );
@@ -73,7 +73,7 @@ pysqlite_cursor_execute(pysqlite_Cursor *self, PyObject *const *args, Py_ssize_t
7373}
7474
7575PyDoc_STRVAR (pysqlite_cursor_executemany__doc__ ,
76- "executemany($self, sql, parameters=<unrepresentable> , /)\n"
76+ "executemany($self, sql, seq_of_parameters , /)\n"
7777"--\n"
7878"\n"
7979"Repeatedly executes a SQL statement." );
@@ -83,16 +83,16 @@ PyDoc_STRVAR(pysqlite_cursor_executemany__doc__,
8383
8484static PyObject *
8585pysqlite_cursor_executemany_impl (pysqlite_Cursor * self , PyObject * sql ,
86- PyObject * parameters );
86+ PyObject * seq_of_parameters );
8787
8888static PyObject *
8989pysqlite_cursor_executemany (pysqlite_Cursor * self , PyObject * const * args , Py_ssize_t nargs )
9090{
9191 PyObject * return_value = NULL ;
9292 PyObject * sql ;
93- PyObject * parameters = NULL ;
93+ PyObject * seq_of_parameters ;
9494
95- if (!_PyArg_CheckPositional ("executemany" , nargs , 1 , 2 )) {
95+ if (!_PyArg_CheckPositional ("executemany" , nargs , 2 , 2 )) {
9696 goto exit ;
9797 }
9898 if (!PyUnicode_Check (args [0 ])) {
@@ -103,12 +103,8 @@ pysqlite_cursor_executemany(pysqlite_Cursor *self, PyObject *const *args, Py_ssi
103103 goto exit ;
104104 }
105105 sql = args [0 ];
106- if (nargs < 2 ) {
107- goto skip_optional ;
108- }
109- parameters = args [1 ];
110- skip_optional :
111- return_value = pysqlite_cursor_executemany_impl (self , sql , parameters );
106+ seq_of_parameters = args [1 ];
107+ return_value = pysqlite_cursor_executemany_impl (self , sql , seq_of_parameters );
112108
113109exit :
114110 return return_value ;
@@ -283,4 +279,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored))
283279{
284280 return pysqlite_cursor_close_impl (self );
285281}
286- /*[clinic end generated code: output=29b5b24ed34ba996 input=a9049054013a1b77]*/
282+ /*[clinic end generated code: output=84d4ba48a211657b input=a9049054013a1b77]*/
0 commit comments