Message156665
| Author |
poq |
| Recipients |
eric.araujo, neologix, pitrou, poq, r.david.murray, telmich |
| Date |
2012年03月23日.14:42:17 |
| SpamBayes Score |
1.931856e-09 |
| Marked as misclassified |
No |
| Message-id |
<1332513738.43.0.395081755722.issue14228@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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? |
|