def str_to_boolean ( input_str ) : if not isinstance ( input_str , six . string_types ) : raise ValueError ( input_str ) input_str = str_quote_stripper ( input_str ) return input_str . lower ( ) in ( "true" , "t" , "1" , "y" , "yes" )
python casting a bool as a string
a conversion function for boolean
def str_to_boolean(input_str):
    """ a conversion function for boolean
    """
    if not isinstance(input_str, six.string_types):
        raise ValueError(input_str)
    input_str = str_quote_stripper(input_str)
    return input_str.lower() in ("true", "t", "1", "y", "yes")