[Python-ideas] IDEA: do not alter default SIGINT handling

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Sep 14 03:12:30 CEST 2009

Steven D'Aprano wrote:

> You can kill an unresponsive Python program from the outside, (say) 
> with ctrl-\, and the finally clause never executes:

Yes, but you expect that signal to kill the process
immediately without bothering with any cleanup.
Ctrl-C, on the other hand, is meant to be a graceful
request to terminate cleanly. In the context of
Python, one can reasonably expect that to include
execution of finally blocks.


More information about the Python-ideas mailing list