mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
Make an f-string error message more exact and consistent.
This commit is contained in:
parent
13a6d2834a
commit
09835dcdbb
2 changed files with 3 additions and 2 deletions
|
@ -4419,7 +4419,7 @@ fstring_find_expr(const char **str, const char *end, int raw, int recurse_lvl,
|
|||
} else if (ch == '#') {
|
||||
/* Error: can't include a comment character, inside parens
|
||||
or not. */
|
||||
ast_error(c, n, "f-string cannot include '#'");
|
||||
ast_error(c, n, "f-string expression part cannot include '#'");
|
||||
return -1;
|
||||
} else if (nested_depth == 0 &&
|
||||
(ch == '!' || ch == ':' || ch == '}')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue