Re: [Tutor] f.readlines(size)

2017-06-07 Thread Nancy Pham-Nguyen
6, 2017 2:12 AM Subject: Re: [Tutor] f.readlines(size) On 05Jun2017 21:04, Nancy Pham-Nguyen wrote: >I'm trying to understand the optional size argument in file.readlines method. >The help(file) shows: > |  readlines(...) |      readlines([size]) -> list of stri

Re: [Tutor] f.readlines(size)

2017-06-07 Thread Nancy Pham-Nguyen via Tutor
e/bound, a certain number of lines will be read. Nancy From: Peter Otten <__pete...@web.de> To: tutor@python.org Sent: Tuesday, June 6, 2017 12:36 AM Subject: Re: [Tutor] f.readlines(size) Nancy Pham-Nguyen wrote: > Hi, Hi Nancy, the only justification for the readlines(

[Tutor] f.readlines(size)

2017-06-06 Thread Nancy Pham-Nguyen via Tutor
Resend with my member's email address. Hi, I'm trying to understand the optional size argument in file.readlines method. The help(file) shows:  |  readlines(...) |      readlines([size]) -> list of strings, each a line from the file. |       |      Call readline() repeatedly and return a list

Re: [Tutor] f.readlines(size)

2017-06-06 Thread Cameron Simpson
On 05Jun2017 21:04, Nancy Pham-Nguyen wrote: I'm trying to understand the optional size argument in file.readlines method. The help(file) shows:  |  readlines(...) |      readlines([size]) -> list of strings, each a line from the file. |       |      Call readline() repeatedly and return a list

Re: [Tutor] f.readlines(size)

2017-06-06 Thread Peter Otten
Nancy Pham-Nguyen wrote: > Hi, Hi Nancy, the only justification for the readlines() method is to serve as a trap to trick newbies into writing scripts that consume more memory than necessary. While the size argument offers a way around that, there are still next to no use cases for readlines.

[Tutor] f.readlines(size)

2017-06-05 Thread Nancy Pham-Nguyen
Hi, I'm trying to understand the optional size argument in file.readlines method. The help(file) shows:  |  readlines(...) |      readlines([size]) -> list of strings, each a line from the file. |       |      Call readline() repeatedly and return a list of the lines so read. |      The option