How are arguments passed to a function through __getattr__
How are arguments passed to a function through __getattr__ Question: Consider the following code example (python 2.7): class Parent: def __init__(self, child): self.child = child def __getattr__(self, attr): print(“Calling __getattr__: “+attr) if hasattr(self.child, attr): return getattr(self.child, attr) else: raise AttributeError(attr) class Child: def make_statement(self, age=10): print(“I am an instance of Child with age “+str(age)) kid …