mirror of
https://github.com/python/cpython.git
synced 2025-10-29 20:51:26 +00:00
[3.9] bpo-41697: Correctly handle KeywordOrStarred when parsing arguments in the parser (GH-22077) (GH-22079)
(cherry picked from commit 315a61f7a9)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
a5d0232b0d
commit
be17295280
4 changed files with 23 additions and 11 deletions
|
|
@ -537,7 +537,7 @@ arguments[expr_ty] (memo):
|
|||
| a=args [','] &')' { a }
|
||||
| incorrect_arguments
|
||||
args[expr_ty]:
|
||||
| a=','.(starred_expression | named_expression !'=')+ b=[',' k=kwargs {k}] { _PyPegen_collect_call_seqs(p, a, b) }
|
||||
| a=','.(starred_expression | named_expression !'=')+ b=[',' k=kwargs {k}] { _PyPegen_collect_call_seqs(p, a, b, EXTRA) }
|
||||
| a=kwargs { _Py_Call(_PyPegen_dummy_name(p),
|
||||
CHECK_NULL_ALLOWED(_PyPegen_seq_extract_starred_exprs(p, a)),
|
||||
CHECK_NULL_ALLOWED(_PyPegen_seq_delete_starred_exprs(p, a)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue