Getting Object References with getattr : getattr « Buildin Function « Python Tutorial






li = ["A", "B"] 

print li.pop                                    
print getattr(li, "pop")                             
print getattr(li, "append")            
print li 
print getattr({}, "clear")                            
print getattr((), "pop")








13.19.getattr
13.19.1.Getting Object References with getattr
13.19.2.getattr with module