Watch the video? This is structural pattern matching - some languages who have it build it upon their existing switch statement, but because Python doesn't have one, it seems like they've added a new switch statement when it's actually far more capable and full of features.
ok I read more comments and I get it now: ITS NOT A SWITCH. The examples with pattern matching blow my mind. Can't wait to use it 2030 when autodesk maya will have it, for now lets continue with 2.7.
-19
u/baconcleaner Mar 19 '21
omg, seriously? What was wrong in using a dict to emulate a switch-case? Do we really need new statements at this point?