+ 4

why there is no switch statement in python?!

25th Mar 2018, 11:13 PM
Hasna Oulaiz
4 Respostas
+ 12
why there is no semi colon in python? 😁
26th Mar 2018, 7:06 PM
Vukan
Vukan - avatar
+ 7
switch was added to languages to offer an alternative to enless nested if... else scenarios. in python however there is an if... elif... else construct. So possibly because elif offers a solution to this pattern, the makers didn't think it necessary to add a second construct that essentially provides the same functionality.
25th Mar 2018, 11:22 PM
Yves Sucaet
Yves Sucaet - avatar
+ 6
I do not think anyone can give you a totally accurate answer about it. The language lacks other elements that are common, and I just imagine that this is a decision on the design of language.
25th Mar 2018, 11:47 PM
Mickel
Mickel - avatar
0
Why are you using too many irrelevant tags ?!
12th May 2018, 5:53 PM
MERZAK Mohamed
MERZAK Mohamed - avatar