in reply to Return a list or an iterator

Not a bad technique, though one that needs clear documentation. FWIW, that's what glob does, too (except the iterator from glob is reset after it hits the end).