def __iter__(self):
lines = self[:]<EOL>for line in lines:<EOL><INDENT>yield line<EOL><DEDENT>
Iterate lines of a buffer.

        This will retrieve all lines locally before iteration starts. This
        approach is used because for most cases, the gain is much greater by
        minimizing the number of API calls by transfering all data needed to
        work.