bpo-34084: Fix setting an error message for the "Barry as BDFL" easte… · pythoncapi/cpython@aba24ff · GitHub
Skip to content

Commit aba24ff

Browse files
bpo-34084: Fix setting an error message for the "Barry as BDFL" easter egg. (pythonGH-8262)
1 parent db8e3a1 commit aba24ff

3 files changed

Lines changed: 22 additions & 8 deletions

File tree

Lib/test/test_flufl.py

Lines changed: 17 additions & 6 deletions

Parser/parsetok.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,7 @@ parsetok(struct tok_state *tok, grammar *g, int start, perrdetail *err_ret,
246246
else if ((ps->p_flags & CO_FUTURE_BARRY_AS_BDFL) &&
247247
strcmp(str, "<>")) {
248248
PyObject_FREE(str);
249-
err_ret->text = "with Barry as BDFL, use '<>' "
250-
"instead of '!='";
249+
err_ret->expected = NOTEQUAL;
251250
err_ret->error = E_SYNTAX;
252251
break;
253252
}

Python/pythonrun.c

Lines changed: 4 additions & 0 deletions

0 commit comments

Comments
 (0)