in reply to Re: Safely reading line by line
in thread Safely reading line by line
If you read data line by line, that's usually because you need it line by line.
Depending on your application it might be possible to handle incomplete lines without much change to your program, or it might not.
If there is a good reason for line based reading, and the line doesn't fit into RAM, you're lost anyway. (Not always, but still rather often).
On the other hand if the line based reading is just a method of chunking the data, then the approach that uses a read limit is probably the way to go.
|
---|