On 06/23/2020 09:01 AM, Guido van Rossum wrote: Very nice! I am totally in favor (with some bike-shedding, of course).
First, a formatting comment: A new sentence immediately following formatted code needs more space -- it looks like the same sentence otherwise. Will putting two spaces after the period help in this case? Testing my understanding -- the following snippet from the PEP match group_shapes(): case [], [point := Point(x, y), *other]: will succeed if group_shapes() returns two lists, the first one being empty and the second one starting with a Point() ? --- Runtime Specifications The __match__ protocol --- Suffers from several indentation errors (the nested lists are not). ------------------------------------------------------------------------- My biggest complaint is the use of case _: Unless I'm missing something, every other control flow statement in Python that can have an "else" type branch uses "else" to denote it: if/else for/else while/else try/except/else Since "else" perfectly sums up what's happening, why "case _" ? match something: case 0 | 1 | 2: print("Small number") case [] | [_]: print("A short sequence") case str() | bytes(): print("Something string-like") else: print("Something else") -- ~Ethan~ _______________________________________________ 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/BEOJ5S4YCTQM27A2B5NDEC6Q7BCYPPYY/ Code of Conduct: http://python.org/psf/codeofconduct/