summaryrefslogtreecommitdiff
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-07-23 15:41:26 -0700
committerSerhiy Storchaka <storchaka@gmail.com>2018-07-24 01:41:26 +0300
commit220afffb683af1ba9e04c37535cfaa41348e9ebb (patch)
treec81c0b44425334c7fdb503aca10c62fa1d6ba1e6 /Python/pythonrun.c
parent519fc551d7778ac698033846bb052a12b7d491e2 (diff)
downloadcpython-git-220afffb683af1ba9e04c37535cfaa41348e9ebb.tar.gz
bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8423)
(cherry picked from commit aba24ff3601ddc86b85e01880a8be596fb799287) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
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 9b9d63ccd8..c4ec5ac66c 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";