switch is not switch
yammesicka opened this issue · 7 comments
https://github.com/brennerm/PyTricks/blob/master/switch.py -
This is not fallthrough as you can expect from switch-case statement ^^"
Thanks :)
Added handling if key is not in dict.
Still not switch :)
https://en.wikipedia.org/wiki/Switch_statement#Fallthrough
Do you see any way to add this functionality in a pythonic way?
@yammesicka
From what I can find Python's switch case statement doesn't support fallthrough.
There are no switch case in Python as far as I know
On Mar 23, 2015 12:28 PM, "Max Brenner" notifications@github.com wrote:
@yammesicka https://github.com/yammesicka
From what I can find Python's switch case statement doesn't support
fallthrough.—
Reply to this email directly or view it on GitHub
#20 (comment).
Damn you're right :D.
That's the problem switching between different languages frequently ;)
updated file