[Python-Dev] __del__ and tp_dealloc in the IO lib

Antoine Pitrou solipsis at pitrou.net
Fri Jan 23 13:33:14 CET 2009


Giovanni Bajo <rasky <at> develer.com> writes:
> 
> The fact that file objects are collected and closed immediately in all
> reasonable use cases (and even in case of exceptions, that you mention,
> things get even better with the new semantic of the except clause)

The new except clause removes any external references to the exception, but
there's still, AFAIR, the reference cycle through the traceback object, which
means the whole thing will still have to wait for a pass of the cyclic garbage
collector.

Regards

Antoine.




More information about the Python-Dev mailing list