summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorMeador Inge <meadori@gmail.com>2012-01-19 01:08:41 -0600
committerMeador Inge <meadori@gmail.com>2012-01-19 01:08:41 -0600
commitfa21bf015d4e9cb0c010fde28db0c344174634d1 (patch)
tree449cbadc11a8420aa3cb8db9678dded1d9176599 /Python
parent00c7f85298b9803371b4a0019ce8732ed8a2dd3b (diff)
downloadcpython-git-fa21bf015d4e9cb0c010fde28db0c344174634d1.tar.gz
Issue #12705: Raise SyntaxError when compiling multiple statements as single interactive statement
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index bff04de599..44b817f546 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -2129,6 +2129,9 @@ err_input(perrdetail *err)
case E_IDENTIFIER:
msg = "invalid character in identifier";
break;
+ case E_BADSINGLE:
+ msg = "multiple statements found while compiling a single statement";
+ break;
default:
fprintf(stderr, "error=%d\n", err->error);
msg = "unknown parsing error";