summaryrefslogtreecommitdiffstats
path: root/Tools/clinic/clinic.py
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/clinic/clinic.py')
-rwxr-xr-xTools/clinic/clinic.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index c1df83a..db57d17 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -960,7 +960,7 @@ class CLanguage(Language):
return_error = ('return NULL;' if simple_return
else 'goto exit;')
parser_code = [libclinic.normalize_snippet("""
- if (nargs) {{
+ if (nargs || (kwnames && PyTuple_GET_SIZE(kwnames))) {{
PyErr_SetString(PyExc_TypeError, "{name}() takes no arguments");
%s
}}