This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年07月25日 20:15 by deleted250130, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg166422 - (view) | Author: (deleted250130) | Date: 2012年07月25日 20:15 | |
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 optional limit could prevent that a high amount of data will be load into the memory. |
|||
| msg166424 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年07月25日 20:35 | |
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." |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:33 | admin | set | github: 59654 |
| 2012年07月25日 20:35:31 | pitrou | set | status: open -> closed resolution: works for me |
| 2012年07月25日 20:35:15 | pitrou | set | nosy:
+ pitrou messages: + msg166424 |
| 2012年07月25日 20:15:47 | deleted250130 | create | |