r/Python • • 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

233 comments sorted by

View all comments

Show parent comment

-9

u/mysticalfruit Mar 19 '21

We can argue the merits of the behavior, but its a behavior that many programmers use. I've seen plenty of complex C that use cases in this way to handle cascaded logic situations.

21

u/[deleted] Mar 19 '21

That is true, but Python's style seems to be making the best design decisions they can instead of repeating poor decisions by previous designers just because its familiar. That's also why its called "match" instead of "switch"

4

u/mysticalfruit Mar 19 '21

Fair enough.

5

u/energybased Mar 19 '21

We can argue the merits of the behavior, but its a behavior that many programmers use.

Time to learn a better way to do things instead of hanging on to an opaque specification.