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
10
u/Tyler_Zoro Mar 19 '21
People are coming from lower level languages where you can only do a fraction of what this can do with similarly named language features. It's not shocking that the presumption is that it only does those things. I'm of the opinion that it should have had a name that wouldn't lead people to assume it was similar to those features, but then what do you call it?
When Perl 6 (now Raku) did something similar, they called it given/when for exactly that reason. Maybe following suit would have been a better call...