

def prepare_iter(next, token):
    token = next()
    if (next[0] == '*'):
        tag = '*'
    elif (not token[0]):
        tag = token[1]
    else:
        raise SyntaxError

    def select(context, result):
        for elem in result:
            for e in elem.iter(tag):
                if (e is not elem):
                    (yield e)
    return select

dataset/ETHPy150Open CollabQ/CollabQ/vendor/elementtree/ElementPath.py prepare_iter/VarMisuse@20/22 `token`->`next`