From ec729d5407adafaae566136448ef0551bb29c070 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 23 Jul 2018 15:41:48 -0700 Subject: bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8424) (cherry picked from commit aba24ff3601ddc86b85e01880a8be596fb799287) Co-authored-by: Serhiy Storchaka --- 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 f03ccc2792..fa0221e3ee 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1337,6 +1337,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