def _clean(x):
    """Clean the passed string by stripping off unnecesary characters,
       and turning "True" and "False" into 1 and 0. Also change
       '=' and ':' into '=='
    """
    x = x.strip()
    if x.lower() == 'true':
        return 1.0
    elif x.lower() == 'false':
        return 0.0
    elif x == '=' or x == ':':
        return '=='
    else:
        return x
