Skip to content

gh-149689: add missing error checks in Parser/action_helpers.c#149710

Open
KowalskiThomas wants to merge 2 commits into
python:mainfrom
KowalskiThomas:kowalski/fix-add-missing-error-checks
Open

gh-149689: add missing error checks in Parser/action_helpers.c#149710
KowalskiThomas wants to merge 2 commits into
python:mainfrom
KowalskiThomas:kowalski/fix-add-missing-error-checks

Conversation

@KowalskiThomas
Copy link
Copy Markdown
Contributor

@KowalskiThomas KowalskiThomas commented May 12, 2026

This PR aims to address the issues raised in #149689.

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 12, 2026

Copy link
Copy Markdown
Contributor

@eendebakpt eendebakpt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall.

Comment thread Parser/action_helpers.c
@@ -1416,6 +1432,9 @@ expr_ty
_PyPegen_template_str(Parser *p, Token *a, asdl_expr_seq *raw_expressions, Token *b) {

asdl_expr_seq *resized_exprs = _get_resized_exprs(p, a, raw_expressions, b, TSTRING);
if (!resized_exprs && PyErr_Occurred()) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The && PyErr_Occurred() is redundant here, but is not hurting either.

@KowalskiThomas KowalskiThomas marked this pull request as ready for review May 12, 2026 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants