def enumeration(*values, **kwargs):
    if not (values and all(isinstance(value, string_types) and value for value in values)):
        raise ValueError("expected a non-empty sequence of strings, got %s" % values)

    if len(values) != len(set(values)):
        raise ValueError("enumeration items must be unique, got %s" % values)

    attrs = dict([ (value, value) for value in values ])
    attrs.update({
        "_values": list(values),
        "_default": values[0],
        "_case_sensitive": kwargs.get("case_sensitive", True),
    })

    return type("Enumeration", (Enumeration,), attrs)()

#: Specify how stroked lines should be joined together
Widen a piece of arbitrary text
dataset/ETHPy150Open bokeh/bokeh/bokeh/core/enums.py/enumeration--crossover with--dataset/ETHPy150Open benoitc/restkit/doc/sitemap_gen.py/Encoder.WidenText