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
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/OZI6TIM6272O5WMSNEL4YQUBTRPUKJ6T/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to