def parse_bool(value):

    if value is None:
        return False

    if isinstance(value, bool):
        return value

    if not isinstance(value, basestring):
        raise ValueError

    false_values = ('false', '0', '')

    return value.lower() not in false_values
Transform special chars in text to have only one line.
dataset/ETHPy150Open tooxie/shiva-server/shiva/utils.py/parse_bool--crossover with--dataset/ETHPy150Open sixohsix/twitter/twitter/archiver.py/direct_format_text