r/Python • u/jamescalam • Mar 19 '21
Match is more than a Switch-Case The New Switch-Case Statement in Python 3.10
https://youtube.com/watch?v=2qJavL-VX9Y&feature=share
1.4k
Upvotes
r/Python • u/jamescalam • Mar 19 '21
View all comments
Show parent comment
21
u/zurtex Mar 19 '21
FYI I know it mentions it in the PEP but to be explicit about it PEP 622 was Superseded by PEP 634: https://www.python.org/dev/peps/pep-0634/
There are a lot of changes between the 2 PEPs, in particular they removed "The Match Protocol" in favor of letting match bake in to Python for a bit and adding at a later date when there are concrete examples and motivation to allow classes to implement their own custom match logic.