Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Closed
ncoghlan wants to merge 1 commit into
python:masterpython/cpython:masterfrom
ncoghlan:bpo-43892-explicit-pattern-matching-astncoghlan/cpython:bpo-43892-explicit-pattern-matching-astCopy head branch name to clipboard
Closed

WIP bpo-43892: Make match patterns explicit in AST#25521
ncoghlan wants to merge 1 commit into
python:masterpython/cpython:masterfrom
ncoghlan:bpo-43892-explicit-pattern-matching-astncoghlan/cpython:bpo-43892-explicit-pattern-matching-astCopy head branch name to clipboard

Conversation

@ncoghlan

@ncoghlan ncoghlan commented Apr 22, 2021

Copy link
Copy Markdown
Contributor
  • 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
Copy Markdown
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.