bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 17 hours agoThe meaning of thislemmy.mlexternal-linkmessage-square54fedilinkarrow-up1434arrow-down111
arrow-up1423arrow-down1external-linkThe meaning of thislemmy.mlbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 17 hours agomessage-square54fedilink
minus-squareSjmarf@sh.itjust.workslinkfedilinkEnglisharrow-up9arrow-down1·9 hours agoPython does have a switch statement 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
minus-squareNichtElias@sh.itjust.workscakelinkfedilinkarrow-up1·4 hours agomatch isn’t just equivalent to switch though, so in this case it actually makes sense to call it something different.
Python does have a
switch
statement 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
match
isn’t just equivalent toswitch
though, so in this case it actually makes sense to call it something different.