def get_attribute_value(obj, bit):
    try:
        value = getattr(obj, bit)
    except (AttributeError, __HOLE__):
        value = None
    else:
        if callable(value) and not isinstance(value, Manager):
            if not hasattr(value, 'alters_data') or value.alters_data is not True:
                value = value()
    return value
dataset/ETHPy150Open pivotal-energy-solutions/django-datatable-view/datatableview/columns.py/get_attribute_value