3 ms·
Yes, and that is the idiomatic way to read files in Python. I guess me and the author are looking at different Python programs, because slurping the whole file
by scott_s 13y ago
Yes, and that is the idiomatic way to read files in Python. I guess me and the author are looking at different Python programs, because slurping the whole file is not "by far the most common way" I have seen files read in the wild.
- rprospero 13y agoMost of my code slurps the entire file at a time. I can't actually think of any code we have that streams the code. Then again, most of my files are three dimensional matrices. There's nothing I can really do on a line by line basis.