On Wednesday, February 6, 2019 at 6:35:27 AM UTC-8, E. Madison Bray wrote: > > > Which is being reached because AlarmInterrupt is a subclass of > KeyboardInterrupt . I don't know why this doesn't happen then when, > say, mashing Ctrl-C. I guess because IPython installs its own SIGINT > handler or something. >
In IPython proper the behaviour is different: In [1]: import signal In [2]: signal.alarm(1) Out[2]: 0 In [3]: Alarm clock <exit> This is the same as in python: >>> import signal >>> signal.alarm(1) 0 >>> Alarm clock It looks like this is just the default signal handler for python (the one that just prints the signal name and exits) Note that cysignals.signals.AlarmInterrupt is our own invention, so if the problem is inheriting from KeyboardInterrupt, we should probably not do that. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.