"Denis Bilenko" <denis.bilenko at gmail.com> writes: > I convinced that this > > line = self._buffer.get(self._bufindex) > if line is None: > self._bufindex += 1 > self._lineno += 1 > self._filelineno += 1 > return line > line = self.readline() I haven't looked at the original file but the above really looks like it should use an iterator instead.