"With open ..." and log-files

I only have it second-hand myself, from @Moguri here: How do I compile a game built in panda3d version 1.10.0?

From what I see in the link that Moguri gave in the above-linked post, the basic problem is that if something goes seriously wrong while the file is open, using “with” guarantees that the file will nevertheless be closed; conversely, eschewing “with” may leave the file open, potentially leading to “memory issues” or the file being corrupted.