STINNER Victor <[email protected]> added the comment:
Python 3.9 parser seems to be more accurate. I don't think that it's worth it
to attempt to enhance Python 3.8 error reporting, since Python 3.9 got a whole
new parser.
@apu$ python3.8 x.py
File "x.py", line 4
open('file1', 'w') as file1,
^
SyntaxError: invalid syntax
$ python3.9 x.py
File "/home/vstinner/x.py", line 4
open('file1', 'w') as file1,
^
SyntaxError: invalid syntax
----------
nosy: +lys.nikolaou, pablogsal, vstinner
title: Wrong location flagged as syntax error -> [Python 3.8] Wrong location
flagged as syntax error
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41982>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com