aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBatuhan Taskaya <batuhanosmantaskaya@gmail.com>2020-10-09 12:56:48 +0300
committerGitHub <noreply@github.com>2020-10-09 10:56:48 +0100
commit48f305fd122080a9181cbda33bdb42ea36a0136f (patch)
tree801a6a7bd051bc6a0075d823779bf9cc24099721 /Grammar
parentUpdated README for python 3.10 (GH-22605) (diff)
downloadcpython-48f305fd122080a9181cbda33bdb42ea36a0136f.tar.gz
cpython-48f305fd122080a9181cbda33bdb42ea36a0136f.tar.bz2
cpython-48f305fd122080a9181cbda33bdb42ea36a0136f.zip
bpo-41979: Accept star-unpacking on with-item targets (GH-22611)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/python.gram2
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram
index e4533b1a1b8..2f52bd7f2f6 100644
--- a/Grammar/python.gram
+++ b/Grammar/python.gram
@@ -182,7 +182,7 @@ with_stmt[stmt_ty]:
| ASYNC 'with' a[asdl_withitem_seq*]=','.with_item+ ':' tc=[TYPE_COMMENT] b=block {
CHECK_VERSION(5, "Async with statements are", _Py_AsyncWith(a, b, NEW_TYPE_COMMENT(p, tc), EXTRA)) }
with_item[withitem_ty]:
- | e=expression 'as' t=target &(',' | ')' | ':') { _Py_withitem(e, t, p->arena) }
+ | e=expression 'as' t=star_target &(',' | ')' | ':') { _Py_withitem(e, t, p->arena) }
| invalid_with_item
| e=expression { _Py_withitem(e, NULL, p->arena) }