def iterdecode(value):

    if not value:
        return tuple()

    result = []
    accumulator = u''

    escaped = False

    for c in value:
        if not escaped:
            if c == CHAR_ESCAPE:
                escaped = True
                continue
            elif c == CHAR_SEPARATOR:
                result.append(accumulator)
                accumulator = u''
                continue
        else:
            escaped = False

        accumulator += c

    result.append(accumulator)

    return tuple(result)
Decode enumerable from string presentation as a tuple
dataset/ETHPy150Open flask-admin/flask-admin/flask_admin/tools.py/iterdecode