mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
bpo-42316: Allow unparenthesized walrus operator in indexes (GH-23317)
This commit is contained in:
parent
cb3e5ed071
commit
cae60187cf
4 changed files with 29 additions and 7 deletions
|
@ -491,7 +491,7 @@ slices[expr_ty]:
|
|||
| a[asdl_expr_seq*]=','.slice+ [','] { _Py_Tuple(a, Load, EXTRA) }
|
||||
slice[expr_ty]:
|
||||
| a=[expression] ':' b=[expression] c=[':' d=[expression] { d }] { _Py_Slice(a, b, c, EXTRA) }
|
||||
| a=expression { a }
|
||||
| a=named_expression { a }
|
||||
atom[expr_ty]:
|
||||
| NAME
|
||||
| 'True' { _Py_Constant(Py_True, NULL, EXTRA) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue