Hacker News new | ask | show | jobs
by ufo 1726 days ago
By the way, does anyone here know how Python compiles the match statements under the hood? Are they converted into something equivalent to if-elif, which tries each option in sequence? Or does it do something more clever?
1 comments

The author replied here that yes, the bytecode is simple, with the exception of the Class matching.

https://news.ycombinator.com/threads?id=benhoyt