provide less mysterious error messages when seeing end-of-line in
single-quoted strings or end-of-file in triple-quoted strings.
closes patch 586561.
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 006ff08..28a8e28 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1247,6 +1247,12 @@
case E_TOKEN:
msg = "invalid token";
break;
+ case E_EOFS:
+ msg = "EOF while scanning triple-quoted string";
+ break;
+ case E_EOLS:
+ msg = "EOL while scanning single-quoted string";
+ break;
case E_INTR:
PyErr_SetNone(PyExc_KeyboardInterrupt);
Py_XDECREF(v);