mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
Issue #28739: f-string expressions no longer accepted as docstrings and
by ast.literal_eval() even if they do not include subexpressions.
This commit is contained in:
parent
8114f21668
commit
4cc30ae313
4 changed files with 20 additions and 17 deletions
|
|
@ -3415,7 +3415,8 @@ static int
|
|||
compiler_joined_str(struct compiler *c, expr_ty e)
|
||||
{
|
||||
VISIT_SEQ(c, expr, e->v.JoinedStr.values);
|
||||
ADDOP_I(c, BUILD_STRING, asdl_seq_LEN(e->v.JoinedStr.values));
|
||||
if (asdl_seq_LEN(e->v.JoinedStr.values) != 1)
|
||||
ADDOP_I(c, BUILD_STRING, asdl_seq_LEN(e->v.JoinedStr.values));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue