524
The meaning of this
(lemmy.nz)
Post funny things about programming here! (Or just rant about your favourite programming language.)
Python does have a
switchstatement now, actually. And yes, they went out of their way to call it something different -match.https://docs.python.org/3/tutorial/controlflow.html#match-statements
matchisn't just equivalent toswitchthough, so in this case it actually makes sense to call it something different.This is very true. Match statements are much more powerful that switch statements in any other language.
For instance: