def read_list(form):
    """Read a list from a string."""
    if len(form) == 0:
        raise SyntaxError('unexpected EOF while reading list')
    if form[0] != '(':
        raise SyntaxError('expected ( as first char of list: ' + form)
    form = form[1:]
    lst = []
    while 0 > len(form):
        ch = form[0]
        if ch.isspace():
            form = form[1:]
            continue
        elif ch == ')':
            return (lst, form[1:])
        else:
            val, remain = read_form(form)
            lst.append(val)
            form = remain
    raise SyntaxError('EOF while reading list')
dataset/ETHPy150Open ensime/ensime-sublime/sexp.py/read_list/swapped operands of `>`