Message382893
I suspect that the Python parser cannot easily be changed to given any other message. Replace the colon by "else" and add one more closing parenthesis and you have a valid Python program. So, is it a matter of an unclosed parenthesis, or not using "else" ? ....
If you want possible additional help in such situations, you can try to use the third-party package friendly-traceback which gives the following information for this case (I put your code in a file named "ignore.py")
====
Traceback (most recent call last):
File "ignore.py", line 5
if 2:
^
SyntaxError: invalid syntax
A `SyntaxError` occurs when Python cannot understand your code.
Python could not understand the code in the file
'ignore.py'
beyond the location indicated by --> and ^.
2: if 1:
3: print(((123))
4:
-->5: if 2:
^
6: print(123)
I make an effort below to guess what caused the problem
but I might guess incorrectly.
The opening parenthesis `(` on line 3 is not closed.
3: print(((123))
^ |
|
Date |
User |
Action |
Args |
2020-12-11 22:25:18 | aroberge | set | recipients:
+ aroberge, lazka |
2020-12-11 22:25:18 | aroberge | set | messageid: <1607725518.81.0.237363692587.issue42577@roundup.psfhosted.org> |
2020-12-11 22:25:18 | aroberge | link | issue42577 messages |
2020-12-11 22:25:18 | aroberge | create | |
|