bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 21 hours agoThe meaning of thislemmy.worldimagemessage-square56linkfedilinkarrow-up1474arrow-down111cross-posted to: programmer_humor@programming.dev
arrow-up1463arrow-down1imageThe meaning of thislemmy.worldbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 21 hours agomessage-square56linkfedilinkcross-posted to: programmer_humor@programming.dev
minus-squareSjmarf@sh.itjust.workslinkfedilinkEnglisharrow-up14arrow-down1·13 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·8 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.