diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2020-11-16 23:09:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-16 23:09:35 (GMT) |
commit | cae60187cf7a7b26281d012e1952fafe4e2e97e9 (patch) | |
tree | 90fe6ee32f7e1df5f6bda8701d7bf5f434f4f382 /Grammar/python.gram | |
parent | cb3e5ed0716114393696ec7201e51fe0595eab4f (diff) | |
download | cpython-cae60187cf7a7b26281d012e1952fafe4e2e97e9.zip cpython-cae60187cf7a7b26281d012e1952fafe4e2e97e9.tar.gz cpython-cae60187cf7a7b26281d012e1952fafe4e2e97e9.tar.bz2 |
bpo-42316: Allow unparenthesized walrus operator in indexes (GH-23317)
Diffstat (limited to 'Grammar/python.gram')
-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 91ce520..a0e9a89 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) } |