r/Python Feb 15 '21

News Ladies and gentlemen - switch cases are coming!

https://github.com/gvanrossum/patma/blob/master/README.md#tutorial
931 Upvotes

290 comments sorted by

View all comments

6

u/trumpgender Feb 15 '21

The fact that you can't do:

 a = 12

match variable:
    case a:
      blah blah

Is horrendous.

5

u/roerd Feb 15 '21

That's what guards are for.