[Python-Dev] Re: Bug [ 959379 ] Implicit close() should check for errors

Tim Peters tim.peters at gmail.com
Tue Oct 26 21:35:38 CEST 2004


[Peter Astrand]
...
> Is it really possible to raise an exception in response to something
> triggered by the GC?

It's possible but wholly useless.  If you try, gc will detect that an
exception was raised, and kill the Python process ungracefully, via

	Py_FatalError("unexpected exception during garbage collection");

You don't want to do that <wink>.


More information about the Python-Dev mailing list