diff options
author | Skip Montanaro <skip@pobox.com> | 2002-08-15 01:20:16 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2002-08-15 01:20:16 (GMT) |
commit | 118ec70ea27000db428ba3e3a757f4b423670db6 (patch) | |
tree | aa0d92d2928436e81c1e85b8aecf23c9a4f7dd4e /Python | |
parent | 90e9a79afdb0bbee73fbdbe252b305ba918e46c3 (diff) | |
download | cpython-118ec70ea27000db428ba3e3a757f4b423670db6.zip cpython-118ec70ea27000db428ba3e3a757f4b423670db6.tar.gz cpython-118ec70ea27000db428ba3e3a757f4b423670db6.tar.bz2 |
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')
-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 006ff08..28a8e28 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); |