8000 Do not generate unused `noptargs` · python/cpython@e6a4e13 · GitHub
[go: up one dir, main page]

Skip to content

Commit e6a4e13

Browse files
committed
Do not generate unused noptargs
1 parent a48971d commit e6a4e13

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Modules/clinic/_testclinic.c.h

Lines changed: 1 addition & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/clinic/clinic.py

Lines changed: 1 addition & 1 deleti 74E0 on
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ def parser_body(prototype, *fields, declarations=''):
10091009
parser_definition = parser_body(parser_prototype, *parser_code)
10101010

10111011
else:
1012-
has_optional_kw = (max(pos_only, min_pos) + min_kw_only < len(converters))
1012+
has_optional_kw = (max(pos_only, min_pos) + min_kw_only < len(converters) - int(vararg != NO_VARARG))
10131013
if vararg == NO_VARARG:
10141014
args_declaration = "_PyArg_UnpackKeywords", "%s, %s, %s" % (
10151015
min_pos,

0 commit comments

Comments
 (0)
0