From 296ffc246851fee9feae70526e845d961a52c8cf Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 23 Sep 2007 21:55:25 +0200 Subject: [PATCH] fix to still support a keyword dictionary besides kw-only args --- Cython/Compiler/Parsing.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index 91e697aa..e0976a5a 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -1772,20 +1772,15 @@ def p_def_statement(s): starstar_arg = None if s.sy == '*': s.next() + if s.sy == 'IDENT': + star_arg = p_py_arg_decl(s) if s.sy == ',': s.next() if s.sy == 'IDENT': args.extend(p_c_arg_list(s, in_pyfunc = 1, kw_only = 1)) - else: - star_arg = p_py_arg_decl(s) - if s.sy == ',': + if s.sy == '**': s.next() - if s.sy == '**': - 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)) + starstar_arg = p_py_arg_decl(s) elif s.sy == '**': s.next() starstar_arg = p_py_arg_decl(s) -- 2.26.2