python中 file.closed 结果总是false
贴出你的代码看一下,或者你尝试以下代码:
f = open('foo.txt','r')print f.closed # Falsef.close() # 关闭文件print f.closed # True