'Initialize a package variant.
Args:
name (str): name of the variant
default (str): default value for the variant in case
nothing has been specified
description (str): purpose of the variant
values (sequence): sequence of allowed values or a callable
accepting a single value as argument and returning True if the
value is good, False otherwise
multi (bool): whether multiple CSV are allowed
validator (callable): optional callable used to enforce
additional logic on the set of values being validated'

def __init__(self, name, default, description, values=(True, False), multi=False, validator=None):

    self.name = name
    self.default = default
    self.description = str(description)
    if callable(values):
        self.single_value_validator = values
        self.values = None
    else:
        self.values = tuple(values)
        allowed = (self.values + (self.default,))
        self.single_value_validator = (lambda x: (x in allowed))
    self.multi = multi
    self.group_validator = validator
