On 2011-05-24 11:52, Simon King wrote:
> It says something about dealloc. That sounds to me as if the error is
> raised in
> sage.rings.polynomial.polynomial_template.Polynomial_template.__dealloc__
>
> Raising an error in dealloc should be avoided, shouldn't it?
The problem is that we don't really have a choice of when a
KeyboardInterrupt is raised. If it happens during __dealloc__, that's
the way it is.
I find it a bit annoying that Python treats KeyboardInterrupt as any
other kind of exception, when it makes a lot of sense to differentiate
KeyboardInterrupt and normal exceptions like ValueError.
I guess we would need something along the lines of
if (PyErr_Occurred() && err_is_not_KeyboardInterrupt)
PyErr_WriteUnraisable(o);
Jeroen.
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org