Skip to content
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

Support the match statement #83

Closed

Conversation

tristanlatr
Copy link
Contributor

@tristanlatr tristanlatr commented Nov 14, 2023

Fixes #81

@tristanlatr tristanlatr marked this pull request as draft November 14, 2023 04:08
@tristanlatr
Copy link
Contributor Author

Ready for a first review. There are probably buggy edge cases

@tristanlatr tristanlatr marked this pull request as ready for review November 16, 2023 22:51
@@ -56,6 +57,22 @@ def parentFunction(self, node):
def parentStmt(self, node):
return self.parentInstance(node, ast.stmt)

_novalue = object()
@contextmanager
def _setattrs(obj, **attrs):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be better not to use this hack... but it allows to reuse some part of the code without duplicating it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, I saw other places where this could be used. So it might simplify other parts as well.

@tristanlatr
Copy link
Contributor Author

Sorry I messed my PRs because I wanted to merge them into a temporary fork repository (that you can find here: https://github.com/pyforks/beniget-ng).
I'll close them until I hear further news from you, hope everything is OK, would be glad to merge these new feature into your repo when you have more time to dedicate to beniget.

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.

Add support for the match statement (python 3.10)
1 participant