Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lysnikolaou committed Jul 4, 2023
1 parent e13e90c commit 03ab852
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Parser/action_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,8 @@ _PyPegen_setup_full_format_spec(Parser *p, Token *colon, asdl_expr_seq *spec, in
return NULL;
}

// This is needed to keep compatibility with 3.11, when an empty format spec is parsed
// as an *empty* JoinedStr node.
if (asdl_seq_LEN(spec) == 1) {
expr_ty e = asdl_seq_GET(spec, 0);
if (e->kind == Constant_kind
Expand Down

0 comments on commit 03ab852

Please sign in to comment.