def validate(cls, value):
        """
        Raise |ValueError| if *value* is not an assignable value.
        """
        if value not in cls._valid_settings:
            raise ValueError(
                "%s not a member of %s enumeration" % (value, cls.__name__)
            )
def validate ( cls , value ) : if value not in cls . _valid_settings : raise ValueError ( "%s not a member of %s enumeration" % ( value , cls . __name__ ) )
Raise |ValueError| if *value* is not an assignable value.