Thanks to visit codestin.com
Credit goes to github.com

Skip to content

WIP bpo-43892: Make match patterns explicit in AST #25521

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

Conversation

ncoghlan
Copy link
Contributor

@ncoghlan ncoghlan commented Apr 22, 2021

  • Separates "pattern" and "expr" nodes in AST
  • AST node names are derived from the AST proposed
    in PEP 642, except that MatchValue always matches
    by equality and a separate MatchConstant node is
    defined for matching by identity
  • Grammar definition has been updated to emit the
    newly defined AST nodes
  • TODO: update code generator to consume new nodes
  • TODO: update AST validator to consume new nodes
  • TODO: update AST unparser to consume new nodes

https://bugs.python.org/issue43892

* Separates "pattern" and "expr" nodes in AST
* AST node names are derived from the AST proposed
  in PEP 642, except that MatchValue always matches
  by equality and a separate MatchConstant node is
  defined for matching by identity
* Grammar definition has been updated to emit the
  newly defined AST nodes
* TODO: update code generator to consume new nodes
* TODO: update AST validator to consume new nodes
* TODO: update AST unparser to consume new nodes
@ncoghlan
Copy link
Contributor Author

Whoops, didn't mean to create this yet.

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.

3 participants