8000 use token prefix in syntax error message · python/cpython@4a50506 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4a50506

Browse files
committed
use token prefix in syntax error message
1 parent f079979 commit 4a50506

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Parser/lexer/lexer.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,7 +1421,8 @@ tok_get_fstring_mode(struct tok_state *tok, tokenizer_mode* current_tok, struct
14211421
return MAKE_TOKEN(
14221422
_PyTokenizer_syntaxerror(
14231423
tok,
1424-
"f-string: newlines are not allowed in format specifiers for single quoted f-strings"
1424+
"%c-string: newlines are not allowed in format specifiers for single quoted %c-strings",
1425+
TOK_GET_STRING_PREFIX(tok),TOK_GET_STRING_PREFIX(tok)
14251426
)
14261427
);
14271428
}

0 commit comments

Comments
 (0)
0