From 4a505067c2a15c8918f3ed034bd104bfb340226c Mon Sep 17 00:00:00 2001 From: dylwil3 Date: Mon, 16 Jun 2025 10:31:57 -0500 Subject: [PATCH] use token prefix in syntax error message --- Parser/lexer/lexer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Parser/lexer/lexer.c b/Parser/lexer/lexer.c index 4d10bccf0a53f2..9c02d4531aeeb8 100644 --- a/Parser/lexer/lexer.c +++ b/Parser/lexer/lexer.c @@ -1421,7 +1421,8 @@ tok_get_fstring_mode(struct tok_state *tok, tokenizer_mode* current_tok, struct return MAKE_TOKEN( _PyTokenizer_syntaxerror( tok, - "f-string: newlines are not allowed in format specifiers for single quoted f-strings" + "%c-string: newlines are not allowed in format specifiers for single quoted %c-strings", + TOK_GET_STRING_PREFIX(tok),TOK_GET_STRING_PREFIX(tok) ) ); }