For this function, my concerns was about generators, since the finditer (by its name) should return an iterator rather than a list. In the case of a generator, the subscript access would fail. Should it be an empty generator, then doing `iter(...).next` would also fail with `StopIteration`.