This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lazka
Recipients lazka
Date 2020-12-05.15:10:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1607181038.72.0.910363231446.issue42577@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-12-05 15:10:38lazkasetrecipients: + lazka
2020-12-05 15:10:38lazkasetmessageid: <1607181038.72.0.910363231446.issue42577@roundup.psfhosted.org>
2020-12-05 15:10:38lazkalinkissue42577 messages
2020-12-05 15:10:38lazkacreate