summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-07-23 20:41:11 (GMT)
committerGitHub <noreply@github.com>2018-07-23 20:41:11 (GMT)
commitaba24ff3601ddc86b85e01880a8be596fb799287 (patch)
treeb9fd7a65221252fda283bfe5ddd3cbdc53a6d888 /Python/pythonrun.c
parentdb8e3a1e4476620b2b5aaf57acfc3ef58a08213b (diff)
downloadcpython-aba24ff3601ddc86b85e01880a8be596fb799287.zip
cpython-aba24ff3601ddc86b85e01880a8be596fb799287.tar.gz
cpython-aba24ff3601ddc86b85e01880a8be596fb799287.tar.bz2
bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262)
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 10605db..f6f06c7 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1348,6 +1348,10 @@ err_input(perrdetail *err)
msg = "unexpected indent";
else if (err->token == DEDENT)
msg = "unexpected unindent";
+ else if (err->expected == NOTEQUAL) {
+ errtype = PyExc_SyntaxError;
+ msg = "with Barry as BDFL, use '<>' instead of '!='";
+ }
else {
errtype = PyExc_SyntaxError;
msg = "invalid syntax";