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 pablogsal
Recipients pablogsal
Date 2021-04-22.18:08:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619114890.78.0.876060892584.issue43914@roundup.psfhosted.org>
In-reply-to
Content
To improve the user experience understanding what part of the error messages associated to SyntaxErrors are wrong, we can highlight the whole error range and not only place the caret at the first character. In this way:

>>> foo(x, z for z in range(10), t, w)
  File "<stdin>", line 1
    foo(x, z for z in range(10), t, w)
           ^
SyntaxError: Generator expression must be parenthesized

becomes

>>> foo(x, z for z in range(10), t, w)
  File "<stdin>", line 1
    foo(x, z for z in range(10), t, w)
           ^^^^^^^^^^^^^^^^^^^^
SyntaxError: Generator expression must be parenthesized
History
Date User Action Args
2021-04-22 18:08:10pablogsalsetrecipients: + pablogsal
2021-04-22 18:08:10pablogsalsetmessageid: <1619114890.78.0.876060892584.issue43914@roundup.psfhosted.org>
2021-04-22 18:08:10pablogsallinkissue43914 messages
2021-04-22 18:08:10pablogsalcreate