[New-bugs-announce] [issue42577] Unhelpful syntax error when expression spans multiple lines
report at bugs.python.org
Sat Dec 5 10:10:38 EST 2020
New submission from Christoph Reiter <reiter.christoph at gmail.com>:
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:
This results in the following error:
File "error.py", line 5
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.
title: Unhelpful syntax error when expression spans multiple lines
versions: Python 3.9
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce