bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 15 hours agoThe meaning of thislemmy.mlimagemessage-square53fedilinkarrow-up1424arrow-down112
arrow-up1412arrow-down1imageThe meaning of thislemmy.mlbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 15 hours agomessage-square53fedilink
minus-squareSjmarf@sh.itjust.workslinkfedilinkEnglisharrow-up7arrow-down1·8 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.workslinkfedilinkarrow-up1·3 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.