def parse_split(value):
    """Decodes the split value.
    
    Returns a tuple (type, value) where type is either perc, num or dir set.
    """
    assert isinstance(value, (int, str))

    if isinstance(value, int):
        return ('num', value)
    elif value.endswith("%"):
        return ('perc', float(value.rstrip("%").strip()))
    elif value.isdigit():
        return ('num', int(value))
    else:
        return ('dir', value)