[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`
Brandt Bucher
report at bugs.python.org
Fri Apr 30 20:04:47 EDT 2021
Brandt Bucher <brandtbucher at gmail.com> added the comment:
Do you mind providing a bit more context? I'm sort of confused what exactly is being proposed here (as far as I can tell, it's not really possible to represent "<pattern> as <name>" with a single Name node).
Also, I'm not sure if you're aware, but we just completed a huge overhaul of the ASTs generated for match statements. This work was specifically done for clients of the AST like mypy. See the discussion at: https://github.com/python/mypy/pull/10191 and in issue 43892.
The new nodes are documented here: https://docs.python.org/3.10/library/ast.html?highlight=matchas#pattern-matching
----------
nosy: +brandtbucher
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43994>
_______________________________________
More information about the Python-bugs-list
mailing list