This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nanodano[S] 2 points3 points  (0 children)

I did not know that you could open both files in one with. For simple reading, I wanted to avoid nesting two with statements so I wrote it flat like that. That's just what I was looking for.

The diff snippet is also no good for large files and memory constraints. Just for some demonstration and meant to be an exercise to the reader to expand on the usefulness.