缓冲区无内容时执行.flush()会不会报错缓冲区无内容时执行.flush()会不会报错
不行,以下代码后2行的flush都没有报错:
fo = open("foo.txt", "wb") print ("Name of the file: ", fo.name) fo.flush() fo.flush() fo.flush() fo.close()