

def deepgetattr(obj, attr):
    'Recurses through an attribute chain to get the ultimate value.'
    return reduce(getattr, attr.split('.'), obj)

dataset/ETHPy150Open tdevelioglu/python-f5/f5/lb.py deepgetattr/original