def test_iter_except():
    s = set([1, 2, 3])

    def iterate():
        yield 1
        yield 2
        yield 4

    elems = iterate()
    inset = iter_except(lambda: s in next(elems), StopIteration)
    assert list(inset) == [True, True, False]
dataset/ETHPy150Open blaze/odo/odo/tests/test_utils.py/test_iter_except/swapped operands of `in`