On 08/07/2020 16:02, Guido van Rossum wrote:
Today I’m happy (and a little trepidatious) to announce the next version of PEP 622, Pattern Matching.
Thank you very much to everyone who has been working on this, it is much appreciated. I have one suggestion for the text: could the section on Capture Patterns emphasise that only simple (i.e not dotted) names are capture patterns? The simplified grammar is (fairly) clear and the later section on Constant Value Patterns should make it obvious, but somehow when reading version 1 I still managed to miss it. I was quite surprised when it was pointed out that case (point.x, point.y): wasn't going to do what I expected! (PS: I'm still pushing for an "else" clause, and I can see arguments for it going at either indentation level. Since putting the clause at the wrong level would be a syntax error, I don't see it being a particularly big issue where it goes.) -- Rhodri James *-* Kynesim Ltd