In the function __getattr__(), if a referred variable is not found then it gives an error. How can I check to see if a variable or method exists as part of an objec
__getattr__()
How about looking it up in dyn.__dict__?
dyn.__dict__
try: method = dyn.__dict__['mymethod'] except KeyError: print "mymethod not in dyn"