Commit 296ffc24 authored by Stefan Behnel's avatar Stefan Behnel

fix to still support a keyword dictionary besides kw-only args

parent f5c283f7
...@@ -1772,20 +1772,15 @@ def p_def_statement(s): ...@@ -1772,20 +1772,15 @@ def p_def_statement(s):
starstar_arg = None starstar_arg = None
if s.sy == '*': if s.sy == '*':
s.next() s.next()
if s.sy == 'IDENT':
star_arg = p_py_arg_decl(s)
if s.sy == ',': if s.sy == ',':
s.next() s.next()
if s.sy == 'IDENT': if s.sy == 'IDENT':
args.extend(p_c_arg_list(s, in_pyfunc = 1, kw_only = 1)) args.extend(p_c_arg_list(s, in_pyfunc = 1, kw_only = 1))
else: if s.sy == '**':
star_arg = p_py_arg_decl(s)
if s.sy == ',':
s.next() s.next()
if s.sy == '**': starstar_arg = p_py_arg_decl(s)
s.next()
starstar_arg = p_py_arg_decl(s)
elif s.sy == 'IDENT':
args.extend(p_c_arg_list(s, in_pyfunc = 1,
kw_only = 1))
elif s.sy == '**': elif s.sy == '**':
s.next() s.next()
starstar_arg = p_py_arg_decl(s) starstar_arg = p_py_arg_decl(s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment