Chi Hsuan Yen added the comment:
The error message is much better now, thanks you all!
Seems the ^ pointer is not always correct. For example, in the function scope
it's correct:
$ cat test.py
def foo():
s = 'C:\Program Files\Microsoft'
$ python3.7 -W error test.py
File "test.py", line 2
s = 'C:\Program Files\Microsoft'
^
SyntaxError: invalid escape sequence \P
On the other hand, top-level literals confuses the pointer:
$ cat test.py
s = 'C:\Program Files\Microsoft'
$ python3.7 -W error test.py
File "test.py", line 1
s = 'C:\Program Files\Microsoft'
^
SyntaxError: invalid escape sequence \P
Is that expected?
Using 259745f9a1e4 on Arch Linux 64-bit
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue28128>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com