Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2021-01-31.22:53:06.078>created_at=<Date2021-01-24.18:00:46.555>labels= []
title='Improve error message in the parser when using un-parenthesised tuples in comprehensions'updated_at=<Date2021-01-31.22:53:06.078>user='https://github.com/pablogsal'
I have seen this confusion many users over the years. Instead of showing:
❯ python -c '[x,z for x,y in something]'
File "<string>", line 1
[x,z for x,y in something]
^
SyntaxError: invalid syntax
We can show:
❯ ./python -c '[x,z for x,y in something]'
File "<string>", line 1
[x,z for x,y in something]
^
SyntaxError: did you forgot parentheses around the comprehension target?
New changeset 835f14f by Pablo Galindo in branch 'master': bpo-43017: Improve error message for unparenthesised tuples in comprehensions (GH24314) 835f14f
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: