News for hackers. Stuff that matters.
Re:Structural pattern matching in Python 3.10 by ufo on Tuesday September 21, 2021 @12:27AM (#28602033)
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?
Re:Structural pattern matching in Python 3.10 by mixmastamyk on Tuesday September 21, 2021 @03:58AM (#28602929)
The author replied here that yes, the bytecode is simple, with the exception of the Class matching.

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