diff options
author | 2020-11-17 01:09:35 +0200 | |
---|---|---|
committer | 2020-11-17 01:09:35 +0200 | |
commit | cae60187cf7a7b26281d012e1952fafe4e2e97e9 (patch) | |
tree | 90fe6ee32f7e1df5f6bda8701d7bf5f434f4f382 /Grammar | |
parent | bpo-42374: Allow unparenthesized walrus in genexps (GH-23319) (diff) | |
download | cpython-cae60187cf7a7b26281d012e1952fafe4e2e97e9.tar.gz cpython-cae60187cf7a7b26281d012e1952fafe4e2e97e9.tar.bz2 cpython-cae60187cf7a7b26281d012e1952fafe4e2e97e9.zip |
bpo-42316: Allow unparenthesized walrus operator in indexes (GH-23317)
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/python.gram | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram index 91ce520be1..a0e9a89ab9 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -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) } |