bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 day agoThe meaning of thislemmy.mlimagemessage-square60fedilinkarrow-up1497arrow-down112
arrow-up1485arrow-down1imageThe meaning of thislemmy.mlbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 1 day agomessage-square60fedilink
minus-squareSjmarf@sh.itjust.workslinkfedilinkEnglisharrow-up16arrow-down1·17 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-up6·12 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.