This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author aroberge
Recipients aroberge, lazka
Date 2020-12-11.22:25:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1607725518.81.0.237363692587.issue42577@roundup.psfhosted.org>
In-reply-to
Content
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))
                            ^
History
Date User Action Args
2020-12-11 22:25:18arobergesetrecipients: + aroberge, lazka
2020-12-11 22:25:18arobergesetmessageid: <1607725518.81.0.237363692587.issue42577@roundup.psfhosted.org>
2020-12-11 22:25:18arobergelinkissue42577 messages
2020-12-11 22:25:18arobergecreate