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 is followed by another case block.
- SyntaxError if an irrefutable pattern 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.