We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
to your account
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
assignee = None
closed_at = <Date 2020-10-09.09:58:18.249>
created_at = <Date 2020-10-09.06:56:54.326>
labels = ['interpreter-core', '3.9']
title = "PEG parser doesn't accept extended unpacking in with statement"
updated_at = <Date 2020-10-09.10:31:15.580>
user = 'https://github.com/oremanj'
activity = <Date 2020-10-09.10:31:15.580>
actor = 'miss-islington'
assignee = 'none'
closed = True
closed_date = <Date 2020-10-09.09:58:18.249>
closer = 'lys.nikolaou'
components = ['Interpreter Core']
creation = <Date 2020-10-09.06:56:54.326>
creator = 'Joshua Oreman'
dependencies = 
files = 
hgrepos = 
issue_num = 41979
keywords = ['patch']
message_count = 3.0
messages = ['378305', '378309', '378311']
nosy_count = 6.0
nosy_names = ['gvanrossum', 'benjamin.peterson', 'pablogsal', 'miss-islington', 'BTaskaya', 'Joshua Oreman']
pr_nums = ['22611', '22612']
priority = 'normal'
resolution = 'fixed'
stage = 'resolved'
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue41979'
versions = ['Python 3.9']
The text was updated successfully, but these errors were encountered:
On Python 3.9.0 with the new PEG parser, the following statement produces a SyntaxError:
with contextlib.nullcontext(range(1, 5)) as (first, *rest, last):
print(first, rest, last)
On 3.8.x, or 3.9.0 with -X oldparser, it succeeds and prints "1 [2, 3] 4" as expected.
As I understand it, the thing after 'as' is an assignment target and should accept anything that can go on the LHS of an equals sign.
Sorry, something went wrong.
New changeset 48f305f by Batuhan Taskaya in branch 'master':
bpo-41979: Accept star-unpacking on with-item targets (GH-22611)
New changeset 42157b9 by Batuhan Taskaya in branch '3.9':
[3.9] bpo-41979: Accept star-unpacking on with-item targets (GH-22611) (GH-22612)
No branches or pull requests