You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could probably even shorten sw.case(4) to just case(4) (that is, naming the context variable case and making it callable). sw.default() could then be spelled case.default(), which is a bit charming. Ditto case.fallthrough().
Activity
etam commentedon Feb 9, 2019
Here it is: https://github.com/q3k/switch4python/
masak commentedon Mar 14, 2019
Heh, I just dropped into this repo to make the exact same suggestion. 😄
masak commentedon Mar 14, 2019
Could probably even shorten
sw.case(4)to justcase(4)(that is, naming the context variablecaseand making it callable).sw.default()could then be spelledcase.default(), which is a bit charming. Dittocase.fallthrough().etam commentedon Mar 14, 2019
@masak here you go: https://github.com/etam/switch4python
masak commentedon Mar 14, 2019
Nice!