def getattrd(obj, name, default=sentinel):
    """
    Same as getattr(), but allows dot notation lookup
    Source: http://stackoverflow.com/a/14324459
    """
    try:
        return functools.reduce(getattr, name.split("."), obj)
    except __HOLE__ as e:
        if default is not sentinel:
            return default
        raise
dataset/ETHPy150Open singingwolfboy/flask-dance/flask_dance/utils.py/getattrd