News for hackers. Stuff that matters.
Re:Don’t Slurp: How to Read Files in Python by mh- on Friday September 27, 2013 @08:15PM (#6460335)
depends on how much you care about performance/memory usage.

for one, variance in the line lengths (by byte count) will probably force the usage of inefficient buffer sizes

also, the parent comment gave one universal example: binary files

Re:Don’t Slurp: How to Read Files in Python by repsilat on Friday September 27, 2013 @08:55PM (#6460434)
Even with binary files, the only reasonable ways I can think to process them are stream-wise and with mmap. (In fact, why would you ever slurp a file when you can mmap it instead?)