From aba24ff3601ddc86b85e01880a8be596fb799287 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 23 Jul 2018 23:41:11 +0300 Subject: bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) --- Python/pythonrun.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 10605db0b6..f6f06c7640 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"; -- cgit v1.2.1