brennerm / PyTricks

Collection of less popular features and tricks for the Python programming language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

switch is not switch

yammesicka opened this issue · comments

https://github.com/brennerm/PyTricks/blob/master/switch.py -
This is not fallthrough as you can expect from switch-case statement ^^"

commented

Thanks :)
Added handling if key is not in dict.

commented

Do you see any way to add this functionality in a pythonic way?

commented

@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).

commented

Damn you're right :D.
That's the problem switching between different languages frequently ;)

commented

updated file