[Python-checkins] Optimized code format (GH-28599)
miss-islington
webhook-mailer at python.org
Tue Sep 28 07:51:44 EDT 2021
https://github.com/python/cpython/commit/a47d67cf46626d8dbd66a81ee7b5f1568afc0521
commit: a47d67cf46626d8dbd66a81ee7b5f1568afc0521
branch: main
author: Rajendra arora <contact.rajendraarora at gmail.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-09-28T04:51:39-07:00
summary:
Optimized code format (GH-28599)
Automerge-Triggered-By: GH:pablogsal
files:
M Parser/string_parser.c
diff --git a/Parser/string_parser.c b/Parser/string_parser.c
index fb37d37553a55..2880d07e5f6fe 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) {
More information about the Python-checkins
mailing list