STINNER Victor added the comment:
The issue is a duplicate of bpo-17852.
--
nosy: +vstinner
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Built-in module _io can lose data from buffered files in
reference cycles
_
New submission from kryptomatrix :
Consider the following program:
f = open("out.txt", "w")
f.write("abc\n")
exit(0)
Please note the absence of f.close().
The documentation
https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files
says that you should use f.close() or with