Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DO NOT MERGE -- Tag strings #103766

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 12 commits into from
Closed
Prev Previous commit
Next Next commit
Lambdafy the expression only, exclusing conversion, spec
  • Loading branch information
gvanrossum committed May 3, 2022
commit d5a0e64502f8b8f355750c6005fe50fae2c6552c
7 changes: 3 additions & 4 deletions 7 Parser/action_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,6 @@ _PyPegen_seq_delete_starred_exprs(Parser *p, asdl_seq *kwargs)
static expr_ty
lambdafy(Parser *p, expr_ty arg)
{
assert(arg->kind == FormattedValue_kind);
arguments_ty args = _PyPegen_empty_arguments(p);
if (args == NULL)
return NULL;
Expand All @@ -898,10 +897,10 @@ _PyPegen_tag_string(Parser *p, expr_ty tag, Token *tok)
for (int i = 0; i < nvalues; i++) {
expr_ty value = asdl_seq_GET(values, i);
if (value->kind == FormattedValue_kind) {
value = lambdafy(p, value);
if (value == NULL)
expr_ty lambda = lambdafy(p, value->v.FormattedValue.value);
if (lambda == NULL)
return NULL;
asdl_seq_SET(values, i, value);
asdl_seq_SET(values, i, lambda);
}
}
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.