Hi Antoine,

On Mon, Apr 9, 2012 at 12:06 AM, Antoine Pitrou <solip...@pitrou.net> wrote:
>
> Hello Paul,
>
> Thanks for the PEP and the description of the various issues.
>
>> An example implementation of a SIGINT handler that interrupts safely
>> might look like::
>>
>>     import inspect, sys, functools
>>
>>     def sigint_handler(sig, frame):
>>         if inspect.getcleanupframe(frame) is None:
>>             raise KeyboardInterrupt()
>>         sys.setcleanuphook(functools.partial(sigint_handler, 0))
>
> It is not clear whether you are proposing this for the default signal
> handler, or only as an example that third-party libraries or frameworks
> could implement.
>

Only as an example. The reason is in "Modifying KeyboardInterrupt"
section under "Unresolved Issues". So it might be changed if there
is demand.

-- 
Paul
_______________________________________________
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