X Tutup
The Wayback Machine - https://web.archive.org/web/20210426195626/https://github.com/python/cpython/tree/master/Objects
Skip to content
master
Switch branches/tags
cpython/Objects/
cpython/Objects/

Latest commit

To improve the user experience understanding what part of the error messages associated with SyntaxErrors is 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
a77aac4

Git stats

Files

Permalink
Failed to load latest commit information.
Source files for various builtin objects
X Tutup