Tweeted By @jakevdp
Important to note, however, that the semantics of this can be quite different from switch. The cases don't simply check equality, they rebind variables that match the specified pattern. For example: pic.twitter.com/vtb2qceIJm
— Jake VanderPlas (@jakevdp) February 11, 2021