mirror of https://github.com/python/cpython
Simplify the production for argument list, making sure that it
actually allows all the legal syntax, and nothing else. Previously, it did not allow a call like func(arg, **dictionary). This closes (again!) SF bug #493243.
This commit is contained in:
parent
10cbe8dcbc
commit
e08c9dbffc
|
@ -422,10 +422,10 @@ series of arguments:
|
||||||
\production{call}
|
\production{call}
|
||||||
{\token{primary} "(" [\token{argument_list} [","]] ")"}
|
{\token{primary} "(" [\token{argument_list} [","]] ")"}
|
||||||
\production{argument_list}
|
\production{argument_list}
|
||||||
{\token{positional_arguments} ["," \token{keyword_arguments}
|
{\token{positional_arguments} ["," \token{keyword_arguments}]
|
||||||
["," "*" \token{expression} ["," "**" \token{expression}]]]}
|
["," "*" \token{expression}] ["," "**" \token{expression}]}
|
||||||
\productioncont{| \token{keyword_arguments} ["," "*" \token{expression}
|
\productioncont{| \token{keyword_arguments} ["," "*" \token{expression}]
|
||||||
["," "**" \token{expression}]]}
|
["," "**" \token{expression}]}
|
||||||
\productioncont{| "*" \token{expression} ["," "**" \token{expression}]}
|
\productioncont{| "*" \token{expression} ["," "**" \token{expression}]}
|
||||||
\productioncont{| "**" \token{expression}}
|
\productioncont{| "**" \token{expression}}
|
||||||
\production{positional_arguments}
|
\production{positional_arguments}
|
||||||
|
|
Loading…
Reference in New Issue