def __getattr__(self, key):
        if key.startswith('_'):
            raise AttributeError(u'model has no attribute {0!r}'.format(key))
        else:
            try:
                return self[key]
            except __HOLE__:
                raise AttributeError(u'no such field {0!r}'.format(key))
dataset/ETHPy150Open beetbox/beets/beets/dbcore/db.py/Model.__getattr__