GC and resource finalization

Ian Kjos ikjos at email.uophx.edu
Sun Apr 28 19:57:14 EDT 2002


>>> class x(file):
 pass

>>> y=x('morethreading.py')
>>> y.foo=y
>>> y=None
>>>

In the slightly more general case, when (if ever) can the interpretter prove
that it is safe to close that file? Will the file be closed?












More information about the Python-list mailing list