#13311: alarm() doesn't work for Cython code
------------------------------------------+----------------------------
Reporter: alexc | Owner: jdemeyer
Type: defect | Status: needs_review
Priority: major | Milestone: sage-5.13
Component: c_lib | Resolution:
Keywords: alarm signal interrupt | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues: rebase
Branch: | Commit:
Dependencies: #14029 | Stopgaps:
------------------------------------------+----------------------------
Comment (by pbruin):
Replying to [comment:20 jdemeyer]:
> No, it doesn't. It causes IPython to print the string
{{{"KeyboardInterrupt"}}}.
Given that an interrupt is not necessarily generated from the keyboard, it
would be more logical from the user's perspective if IPython would print
either (1) a generic message like `"Interrupt"`, (2) a different string
for `KeyboardInterrupt` and `AlarmInterrupt`, or even (3) nothing (Bash
just prints a newline when you press `^C` and nothing when you press
`^\`.)
I would be in favour of (2); to implement this, IPython could print
`E.__class__.__name__` inside `except KeyboardInterrupt as E` instead of
the constant string `"KeyboardInterrupt"`.
In principle it would also make more sense if `KeyboardInterrupt` and
`AlarmInterrupt` would derive from a common `Interrupt` exception, but
this is impossible since `KeyboardInterrupt` is a built-in Python
exception.
--
Ticket URL: <http://trac.sagemath.org/ticket/13311#comment:23>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/groups/opt_out.