]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Optimized code format (GH-28599)
authorRajendra arora <contact.rajendraarora@gmail.com>
Tue, 28 Sep 2021 11:51:39 +0000 (17:21 +0530)
committerGitHub <noreply@github.com>
Tue, 28 Sep 2021 11:51:39 +0000 (04:51 -0700)
Automerge-Triggered-By: GH:pablogsal
Parser/string_parser.c

index fb37d37553a552d30db3f58e94ba3e8fd45393b1..2880d07e5f6fe3ae704bf83bff4556657c845293 100644 (file)
@@ -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) {