Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 24839:17e95cc06f69 legacy-trunk
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.
| author | Skip Montanaro <skip@pobox.com> |
|---|---|
| date | Thu, 15 Aug 2002 01:20:16 +0000 |
| parents | 06f1e2fd05bc |
| children | 0231cc54f87e |
line wrap: on
line diff
--- a/Python/pythonrun.c Thu Aug 15 00:40:21 2002 +0000 +++ b/Python/pythonrun.c Thu Aug 15 01:20:16 2002 +0000 @@ -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);
