3 ms·
Have a look at the the tutorial pep and you'll realize like I did, that pattern matching and case switches solve very different use cases, and that if-else are
by wodenokoto 6y ago
Have a look at the the tutorial pep and you'll realize like I did, that pattern matching and case switches solve very different use cases, and that if-else are a long shot from pattern matching.
https://www.python.org/dev/peps/pep-0636/ https://www.python.org/dev/peps/pep-0636/
> and I remember reading that Guido didn't want a match and case construct.
look at who the sponsor of that pep is.
- belval 6y agoI can absolutely see that it could be useful, what I am saying is that I would prefer the language to stay lean and steer away from adding features offering minimal quality of life improvements. As for Guido being the sponsor, he also pushed for it in 2006 and it was rejected for lack of popular support. His opinion back then still resonates with me today: https://www.python.org/dev/peps/pep-3103/#rationale https://www.python.org/dev/peps/pep-3103/#rationale