Comment 4 for bug 700478

Revision history for this message
IRIE Shinsuke (irie) wrote :

@Jonathan
Thanks, but the error still occurs.

I think your changes take no effect because a file object should automatically close when its reference count hits zero. For example,

Code 1:

import os
f=[]
for name in os.listdir("."):
    f.append(open(name))

Code 2:

import os
for name in os.listdir("."):
    f=open(name)

Code 1 can cause the error but code 2 doesn't.