def _set(data, name, value, unset_value=None):
    """Safely set data attribute or unset if user set it to a special value."""
    if value is None:
        return False

    if unset_value is not None and value == unset_value:
        data.pop(name, None)
    elif value in ('-', ['-']):
        data.pop(name, None)
    else:
        data[name] = value
    return True