Message382566
I don't know if the bug tracker is the right place for this, please point me to the right place if not.
Someone faced to the following code (simplified example here) and asked for help:
```
if 3:
if 1:
print(((123))
if 2:
print(123)
```
This results in the following error:
```
File "error.py", line 5
if 2:
^
SyntaxError: invalid syntax
```
which is very confusing to users not familiar with generator expressions.
I'm wondering if python could improve syntax errors in this case by adding more context, like point to where it started parsing the current thing and where it gave up instead to just the later. |
|
Date |
User |
Action |
Args |
2020-12-05 15:10:38 | lazka | set | recipients:
+ lazka |
2020-12-05 15:10:38 | lazka | set | messageid: <1607181038.72.0.910363231446.issue42577@roundup.psfhosted.org> |
2020-12-05 15:10:38 | lazka | link | issue42577 messages |
2020-12-05 15:10:38 | lazka | create | |
|