Message389071
Normally, for SyntaxErrors, the location of the error is indicated by a ^. There is at least one case where the location is missing for 3.9 and 3.10.0a6 where it was shown before. Using the old parser for 3.9, or with previous versions of Python, the location is shown.
Python 3.10.0a6 ... on win32
>>> a = 3 \ 4
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>>
Python 3.9.0 ... on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 3 \ 4
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>>
Using the old parser with Python 3.9, the location of the error is shown *after* the unexpected character.
> python -X oldparser
Python 3.9.0 ... on win32
>>> a = 3 \ 4
File "<stdin>", line 1
a = 3 \ 4
^
SyntaxError: unexpected character after line continuation character
>>>
Using Python 3.8 (and 3.7, 3.6), the location is pointing at the unexpected character.
Python 3.8.4 ... on win32
>>> a = 3 \ 4
File "<stdin>", line 1
a = 3 \ 4
^
SyntaxError: unexpected character after line continuation character
>>> |
|
Date |
User |
Action |
Args |
2021-03-19 11:18:52 | aroberge | set | recipients:
+ aroberge |
2021-03-19 11:18:52 | aroberge | set | messageid: <1616152732.25.0.508578313833.issue43555@roundup.psfhosted.org> |
2021-03-19 11:18:52 | aroberge | link | issue43555 messages |
2021-03-19 11:18:52 | aroberge | create | |
|