summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-07-23 22:41:48 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2018-07-23 22:41:48 (GMT)
commitec729d5407adafaae566136448ef0551bb29c070 (patch)
tree0810fce37550382cb413abb6018d3dda37806b1e /Python/pythonrun.c
parent5b3643d1a5114551350a9d17fb0aaab2d503c290 (diff)
downloadcpython-ec729d5407adafaae566136448ef0551bb29c070.zip
cpython-ec729d5407adafaae566136448ef0551bb29c070.tar.gz
cpython-ec729d5407adafaae566136448ef0551bb29c070.tar.bz2
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 <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 f03ccc2..fa0221e 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";