[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-08-02 Thread Guido van Rossum
Your point about wanting a way to use an unqualified name as a value pattern is not unreasonable, and as you may recall we had an elegant solution in version 1 of the PEP: a leading dot. However that was booed away by the critics, and there has been no consensus (not even close) on what to do inste

[Python-Dev] Re: PEP 622 version 2 (Structural Pattern Matching)

2020-08-02 Thread Caleb Donovick
> `np` analogue is quite a stretch and far-fetched, really. I don't disagree. But `_` is a valid identifier so it shouldn't be special. The solution is incredibly simple: allow repeated identifiers just like in assignment so there is no need for a special wildcard symbol. > .. I disagree