osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FDs will be closed after exception automatically in python2.7?


as title,

I confused will fd will be close after exception automatically?

Like:
try:
fd=open("file","w+")
fd.get() //any useless function of fd
except Exception:
print 'hi'