Created
October 11, 2010 21:09
-
-
Save bussiere/621235 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class toto : | |
def titi(self): | |
print "poutou" | |
string = "titi" | |
t = toto() | |
if string in dir(t): | |
getattr(t,string)() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment