(option, value)
Validates that 'value' is True or False.
Validates that 'value' is True or False.
Validates that value is True or False .
def validate_boolean(option, value):
    """Validates that 'value' is True or False."""
    if isinstance(value, bool):
        return value
    raise TypeError("%s must be True or False" % (option,))
def validate_boolean ( option , value ) : if isinstance ( value , bool ) : return value raise TypeError ( "%s must be True or False" % ( option , ) )