]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40985: Show correct SyntaxError text when last line has a LINECONT (GH-20888)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 16 Jun 2020 00:46:44 +0000 (17:46 -0700)
committerGitHub <noreply@github.com>
Tue, 16 Jun 2020 00:46:44 +0000 (17:46 -0700)
commit097b8b6d52e3d4991c68dce74f182718dc0eab9c
tree33fddfdbcb5e850058ba7ccfb64087d2aa411342
parentbc996c67b7ba73886bb6edfd637ef3f874ddc9d4
bpo-40985: Show correct SyntaxError text when last line has a LINECONT (GH-20888)

When a file ends with a line that contains a line continuation character
the text of the emitted SyntaxError is empty, contrary to the old
parser, where the error text contained the text of the last line.
(cherry picked from commit 113e2b0a07c72c0d5e3489076afb14f6b3ad1049)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Lib/test/test_eof.py
Misc/NEWS.d/next/Core and Builtins/2020-06-15-16-29-55.bpo-40985.IIN_xX.rst [new file with mode: 0644]
Python/errors.c