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.
This commit is contained in:
Skip Montanaro 2002-08-15 01:20:16 +00:00
parent 90e9a79afd
commit 118ec70ea2
3 changed files with 14 additions and 3 deletions

View file

@ -1247,6 +1247,12 @@ err_input(perrdetail *err)
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);