Willem Broekema wrote:
> On 7/31/05, Brett Cannon <[EMAIL PROTECTED]> wrote:
> 
>>While we do tend to use KeyboardInterrupt as a way to kill a
>>program, is that really control flow, or a critical exception
>>that the program needs to stop because an serious event
>>occurred?
> 
> 
> I does not seem right to me to think of KeyboardInterrupt as a means
> to cause program halting. An interpreter could in principle recover
> from it and resume execution of the program.

Actually, even in some such theoretical "Did you really mean that?" 
interpreter, the KeyboardInterrupt only gets raised if the interpreter 
determines that yes, the user really did want the program terminated. 
Otherwise, no exception is raised at all, and execution continues as usual.

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.blogspot.com
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to