summaryrefslogtreecommitdiffstats
path: root/Parser/string_parser.c
diff options
context:
space:
mode:
authorRajendra arora <contact.rajendraarora@gmail.com>2021-09-28 11:51:39 (GMT)
committerGitHub <noreply@github.com>2021-09-28 11:51:39 (GMT)
commita47d67cf46626d8dbd66a81ee7b5f1568afc0521 (patch)
tree33140c62fc4b9562ffa82bae89b97598b9cb062f /Parser/string_parser.c
parentdb0133f98dd42d0fb82a7675bde175cec51bb860 (diff)
downloadcpython-a47d67cf46626d8dbd66a81ee7b5f1568afc0521.zip
cpython-a47d67cf46626d8dbd66a81ee7b5f1568afc0521.tar.gz
cpython-a47d67cf46626d8dbd66a81ee7b5f1568afc0521.tar.bz2
Optimized code format (GH-28599)
Automerge-Triggered-By: GH:pablogsal
Diffstat (limited to 'Parser/string_parser.c')
-rw-r--r--Parser/string_parser.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Parser/string_parser.c b/Parser/string_parser.c
index fb37d37..2880d07 100644
--- a/Parser/string_parser.c
+++ b/Parser/string_parser.c
@@ -1127,9 +1127,7 @@ _PyPegen_FstringParser_ConcatFstring(Parser *p, FstringParser *state, const char
/* We know we have an expression. Convert any existing string
to a Constant node. */
- if (!state->last_str) {
- /* Do nothing. No previous literal. */
- } else {
+ if (state->last_str) {
/* Convert the existing last_str literal to a Constant node. */
expr_ty last_str = make_str_node_and_del(p, &state->last_str, first_token, last_token);
if (!last_str || ExprList_Append(&state->expr_list, last_str) < 0) {