News for hackers. Stuff that matters.
Re:What Is the Switch-Case Equivalent in Python? by brundolf on Sunday April 04, 2021 @02:13AM (#26687305)
I would say it's much more powerful than switch-case, but it's only moderately more ergonomic than elif. The reason for the former being that switch-case only ever checks exact equivalency; if you need to do anything slightly more nuanced, you have to bail out to something more flexible.

There are no comments on this comment yet.