import six


def eval_boolean(value):
    """Attempt to evaluate the argument as a boolean"""
    if isinstance(value, bool):
        return value
    elif isinstance(value, six.integer_types):
        return value != 0
    else:
        return value.lower() in ['true', 'yes', 'on']