[New-bugs-announce] [issue42864] Improve error messages regarding unclosed parentheses
Pablo Galindo Salgado
report at bugs.python.org
Thu Jan 7 22:03:30 EST 2021
New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:
Consider this file:
```
x = (
```
The error that we get is:
❯ python ../a.py
File "/home/pablogsal/github/python/master/../a.py", line 6
^
SyntaxError: unexpected EOF while parsin
This is quite uninformative of the actual problem, which is the closed parentheses.
The same happens with something like this:
( 1+2
File "/home/pablogsal/github/python/master/lel.py", line 3
^
SyntaxError: unexpected EOF while parsing
With some effort, we can include the location of the unclosed parentheses.
----------
messages: 384630
nosy: pablogsal
priority: normal
severity: normal
status: open
title: Improve error messages regarding unclosed parentheses
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42864>
_______________________________________
More information about the New-bugs-announce
mailing list