diff options
author | Skip Montanaro <skip@pobox.com> | 2002-08-15 01:20:16 +0000 |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2002-08-15 01:20:16 +0000 |
commit | 6d7f7b1662ffb2189a4af734c6b7e64a0b51af20 (patch) | |
tree | aa0c4d5049cc7f239339ea4a62d907ecf0e6935b /Python/pythonrun.c | |
parent | 43bf9cc1ee2a131b977f0980dd9b68144a0ab99c (diff) | |
download | cpython-6d7f7b1662ffb2189a4af734c6b7e64a0b51af20.tar.gz |
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.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 006ff083d2..28a8e28e11 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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); |