Is there a particular reason this takes a list of lines rather than a full text, or an iterator over lines or a file-like object?