[issue43994] change representation of match as / capture as `Name(..., ctx=Store())`

Adrian Freund report at bugs.python.org
Sat May 1 01:40:51 EDT 2021


Adrian Freund <git at freundtech.com> added the comment:

I already brought this up on the main pattern matching issue some time ago (https://bugs.python.org/issue42128#msg388554), where the consensus was that not using a Name is consistent with other parts of the ast, such as `import ... as identifier`, `except ... as identifier` and others.

For mypy having a Name node there would slightly simplify the code (I'm currently inserting a dummy NameExpr at AST-Conversion.

+0 from me.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43994>
_______________________________________


More information about the Python-bugs-list mailing list