Created
July 3, 2013 13:25
-
-
Save saurabh-hirani/5917820 to your computer and use it in GitHub Desktop.
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
#!/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