Skip to content

Python syntax error reporting has changed #50

Description

@connorjward

With Python 3.13 (and perhaps earlier) the example in chapter 6 of a multiline syntax error no longer works:

>>> (1, 2
... print(a)
...
  File "<python-input-0>", line 1
    (1, 2
    ^
SyntaxError: '(' was never closed

Python is smart enough to know that the error is happening on the line above and no longer points to print(a) as the culprit.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions