diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-07-23 22:41:26 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-07-23 22:41:26 (GMT) |
| commit | 220afffb683af1ba9e04c37535cfaa41348e9ebb (patch) | |
| tree | c81c0b44425334c7fdb503aca10c62fa1d6ba1e6 /Python/pythonrun.c | |
| parent | 519fc551d7778ac698033846bb052a12b7d491e2 (diff) | |
| download | cpython-220afffb683af1ba9e04c37535cfaa41348e9ebb.zip cpython-220afffb683af1ba9e04c37535cfaa41348e9ebb.tar.gz cpython-220afffb683af1ba9e04c37535cfaa41348e9ebb.tar.bz2 | |
bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (GH-8262) (GH-8423)
(cherry picked from commit aba24ff3601ddc86b85e01880a8be596fb799287)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Python/pythonrun.c')
| -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 9b9d63c..c4ec5ac 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"; |
