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.

classification
Title: better parser error message for non-EOL following line cont.
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, laotzu0, loewis
Priority: normal Keywords: patch

Created on 2003-09-08 00:03 by laotzu0, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
linecont.diff laotzu0, 2003-09-08 00:03 line continuation error message patch
Messages (3)
msg44584 - (view) Author: Mathieu Fenniak (laotzu0) Date: 2003-09-08 00:03
This small patch adds a specific error message for when a 
line continuation character (\) is followed by something 
other than a newline.  If the character following the \ is 
whitespace, it can be difficult to see why it is an 'invalid 
token' as the error message used to say.
msg44585 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-02-23 18:30
Logged In: YES 
user_id=1188172

While this may be helpful when the invalid token is
whitespace, Python usually shows the exact location of the
invalid token, so you can examine this line and find the
error. On the other hand, the patch is no big deal, so if a
specific error message is welcome, it may as well be applied.
msg44586 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-03-03 11:46
Logged In: YES 
user_id=21627

Thanks for the patch and the review. Committed as

errcode.h 2.17
NEWS 1.1259
tokenizer.c 2.77
pythonrun.c 2.212
History
Date User Action Args
2022-04-10 16:11:03adminsetgithub: 39199
2003-09-08 00:03:52laotzu0create