Possible File iteration bug

bruno.desthuilliers at gmail.com bruno.desthuilliers at gmail.com
Fri Jul 15 04:01:23 EDT 2011


On Jul 14, 9:46 pm, Billy Mays <no... at nohow.com> wrote:
> I noticed that if a file is being continuously written to, the file
> generator does not notice it:
>
> def getLines(f):
>      lines = []
>      for line in f:
>          lines.append(line)
>      return lines

what's wrong with file.readlines() ?



More information about the Python-list mailing list