Skip to content

Instantly share code, notes, and snippets.

@saurabh-hirani
Created July 3, 2013 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saurabh-hirani/5917820 to your computer and use it in GitHub Desktop.
Save saurabh-hirani/5917820 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
def func1(arg):
print "calling func1 with arg " + str(arg)
def func2(arg):
print "calling func2 with arg " + str(arg)
callbacks_dict = { 'func1': func1, 'func2': func2 }
callbacks_dict['func1'](1)
callbacks_dict['func2'](2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment