def yes_no(value):
    """For a yes or no question, returns a boolean.
    """
    if value.lower() in ('yes','y'):
        return True
    if value.lower() in ('no','n'):
        return False
    raise ValueError("value should be 'yes' or 'no'")