summaryrefslogtreecommitdiffstats
path: root/Modules/_sre/clinic
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/_sre/clinic')
-rw-r--r--Modules/_sre/clinic/sre.c.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_sre/clinic/sre.c.h b/Modules/_sre/clinic/sre.c.h
index cd3fbbc..48336c7 100644
--- a/Modules/_sre/clinic/sre.c.h
+++ b/Modules/_sre/clinic/sre.c.h
@@ -1434,7 +1434,7 @@ _sre_SRE_Scanner_match_impl(ScannerObject *self, PyTypeObject *cls);
static PyObject *
_sre_SRE_Scanner_match(ScannerObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
- if (nargs) {
+ if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
PyErr_SetString(PyExc_TypeError, "match() takes no arguments");
return NULL;
}
@@ -1455,10 +1455,10 @@ _sre_SRE_Scanner_search_impl(ScannerObject *self, PyTypeObject *cls);
static PyObject *
_sre_SRE_Scanner_search(ScannerObject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
{
- if (nargs) {
+ if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {
PyErr_SetString(PyExc_TypeError, "search() takes no arguments");
return NULL;
}
return _sre_SRE_Scanner_search_impl(self, cls);
}
-/*[clinic end generated code: output=ad513f31b99505fa input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c3e711f0b2f43d66 input=a9049054013a1b77]*/