Why does list have no 'get' method?

Paul Rubin http
Thu Feb 7 16:35:48 EST 2008


"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.



More information about the Python-list mailing list