Last active
June 27, 2018 15:37
-
-
Save cpebble/721e1a4d0d7ef0281ce8610c94643eed to your computer and use it in GitHub Desktop.
Python Switch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch = lambda funcs, query: funcs[query] if query in funcs else funcs['default'] | |
# Porting the switch statement to python | |
# GPL Christian Påbøl Jacobsen @mrcpj1998 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment