bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8424)

(cherry picked from commit aba24ff360)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-07-23 15:41:48 -07:00 committed by Serhiy Storchaka
parent 5b3643d1a5
commit ec729d5407
3 changed files with 22 additions and 8 deletions

View file

@ -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";