poq <p...@gmx.com> added the comment:

> No, the point is that the exception may be caused by a real bug and having 
> the traceback is tremendously useful to debug such situations. [...] 
> KeyboardInterrupt is not different in this regard from, say, 
> ZeroDivisionError.

KeyboardInterrupt *is* different though. It is caused by the user instead of by 
any bug.

Of course, it can still be useful to know where the program was interrupted, so 
showing a traceback for KeyboardInterrupt by default makes sense IMO.

> As I said, a possible solution is to allow users to alter the default signal 
> handling (using an env var).

Why an environment variable instead of a command line switch (as suggested by 
Ian Jackson)? Shouldn't a script be able to decide for itself how it handles 
signals?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14228>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to