[issue15449] Optional size argument for readline()

2012-07-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: -> works for me status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing

[issue15449] Optional size argument for readline()

2012-07-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it does: http://docs.python.org/dev/library/io.html#io.IOBase.readline “readline(limit=-1) Read and return one line from the stream. If limit is specified, at most limit bytes will be read.” -- nosy: +pitrou ___

[issue15449] Optional size argument for readline()

2012-07-25 Thread Sworddragon
New submission from Sworddragon : For file objects the read() function has the optional size argument to limit the data that will be read. I'm wondering why there isn't such an argument for readline(). Theoretically lines in a file could have million of characters and even much more. An option