def test_index(): l = Loop(range(9)) for x in l(3): print l.index, l.count, l.isfirst(), l.islast(), l.iseven(), x print l.isempty()