From 118ec70ea27000db428ba3e3a757f4b423670db6 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Thu, 15 Aug 2002 01:20:16 +0000 Subject: 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. --- Python/pythonrun.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Python/pythonrun.c') 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); -- cgit v1.2.1