From: Stefan Behnel Date: Sun, 23 Sep 2007 19:55:25 +0000 (+0200) Subject: fix to still support a keyword dictionary besides kw-only args X-Git-Tag: 0.9.6.14~29^2~129^2~1 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=296ffc246851fee9feae70526e845d961a52c8cf;p=cython.git fix to still support a keyword dictionary besides kw-only args --- 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)