bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 6 days agoThe meaning of thislemmy.mlimagemessage-square63fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1imageThe meaning of thislemmy.mlbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 6 days agomessage-square63fedilink
minus-squareSjmarf@sh.itjust.workslinkfedilinkEnglisharrow-up0·6 days 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-up0·6 days 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.