Skip to content

Match statements rewrite #5628

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

Merged
merged 5 commits into from
Apr 10, 2025
Merged

Match statements rewrite #5628

merged 5 commits into from
Apr 10, 2025

Conversation

arihant2math
Copy link
Collaborator

@arihant2math arihant2math commented Mar 26, 2025

Retains all match statement functionality, but rewrites all the match statement code to reduce bugs and mirror cpython. Also, it adds support for the rest of the patterns (hopefully).

Also this re-enables the codegen tests that the ruff port disabled.

Fixes: #5628 and #5491

@arihant2math arihant2math marked this pull request as ready for review March 30, 2025 20:09
@arihant2math
Copy link
Collaborator Author

Note that class and sequence matching is broken, but this is still a significant improvement over the current implementation.

@arihant2math arihant2math changed the title Match statements redo Match statements rewrite Mar 30, 2025
Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

Looks great in general.

@coolreader18 Could you review this PR?

@youknowone
Copy link
Member

@coolreader18 do you have time to review?

@youknowone youknowone merged commit 8dc1718 into RustPython:main Apr 10, 2025
10 of 11 checks passed
@youknowone
Copy link
Member

@coolreader18 I wish you could comment just will do or not do

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.

2 participants