diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-07-23 20:41:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 20:41:11 (GMT) |
commit | aba24ff3601ddc86b85e01880a8be596fb799287 (patch) | |
tree | b9fd7a65221252fda283bfe5ddd3cbdc53a6d888 /Python | |
parent | db8e3a1e4476620b2b5aaf57acfc3ef58a08213b (diff) | |
download | cpython-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')
-rw-r--r-- | Python/pythonrun.c | 4 |
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"; |