Skip to content

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jul 14, 2025

Local testing of positions and code highlight:

Снимок экрана 2025-07-14 в 17 09 57

@sobolevn
Copy link
Member Author

Снимок экрана 2025-07-15 в 11 59 52

Comment on lines 1308 to 1312
| 'assert' expression ',' a=expression '=' b=expression {
RAISE_SYNTAX_ERROR_KNOWN_RANGE(
a, b,
"cannot assign to %s here. Maybe you meant '==' instead of '='?",
_PyPegen_get_expr_name(a)) }
Copy link
Member

Choose a reason for hiding this comment

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

Is the second alternative here needed in reality. If someone's using the second argument here and have a comparison there, maybe they're confused and meant something completely different?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, good question. They might. For example, assert some.method() == other.method(), some == other might be a realiastic case. But, I am open to other opinions :)

@sobolevn
Copy link
Member Author

 trim trailing whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing Grammar/python.gram

This is a bit annoying. I opened #136680 to fix this.

@sobolevn
Copy link
Member Author

sobolevn commented Sep 9, 2025

@pablogsal @lysnikolaou friendly ping :)

Copy link
Member

@lysnikolaou lysnikolaou left a comment

Choose a reason for hiding this comment

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

This looks good to me! I played around a bit with it as well and couldn't find something obviously wrong.

@sobolevn
Copy link
Member Author

sobolevn commented Sep 9, 2025

Thanks! I will wait for a week or so for @pablogsal's review. And merge it or address comments and merge it :)

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

Let's roll! 🚀

@sobolevn sobolevn merged commit 6bc65c3 into python:main Sep 9, 2025
49 checks passed
@sobolevn
Copy link
Member Author

sobolevn commented Sep 9, 2025

🛼 rolling! Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants