On 2020-10-22 17:48, Guido van Rossum wrote:
After the pattern matching discussion died out, we discussed it with the
Steering Council. Our discussion ended fairly positive, but there were a
lot of problems with the text. We decided to abandon the old PEP 622 and
break it up into three parts:
- PEP 634: Specification
- PEP 635: Motivation and Rationale
- PEP 636: Tutorial
This turned out to be more work than I had expected (basically we wrote
all new material) but we've finally made it to a point where we can
request feedback and submit the new version to the SC for approval.
While the text of the proposal is completely different, there aren't
that many substantial changes:
- We changed walrus patterns ('v := p') to AS patterns ('p as v').
- We changed the method of comparison for literals None, False, True to
use 'is' instead of '=='.
- SyntaxError if an irrefutable case[1] is followed by another case block.
- SyntaxError if an irrefutable pattern[1] occurs on the left of '|',
e.g. 'x | [x]'.
Is "syntax error" that the right term for it? Maybe it should be
something different, a subclass of SyntaxError perhaps.
[snip]
_______________________________________________
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/JHX6WDK3GMJD6ALXWEJ3K45WOXQUKZQW/
Code of Conduct: http://python.org/psf/codeofconduct/