Skip to content

Instantly share code, notes, and snippets.

@wwgist
Created March 7, 2013 14:07
Show Gist options
  • Save wwgist/5108281 to your computer and use it in GitHub Desktop.
Save wwgist/5108281 to your computer and use it in GitHub Desktop.
PYTHON: switch analog...
keycode = 2
functions = {1: func1, 2: func2, 3: func3}
functions.get(keycode, default_func)()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment