[Python-Dev] Proposing a sys.special_exceptions tuple (original) (raw)
Phillip J. Eby pje at telecommunity.com
Thu Sep 30 21:37:17 CEST 2004
- Previous message: [Python-Dev] Proposing a sys.special_exceptions tuple
- Next message: [Python-Dev] [OT] stats on type-inferencing atomic types in local variables in the stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 12:52 PM 9/30/04 -0300, Lalo Martins wrote:
On Thu, Sep 30, 2004 at 10:19:22AM -0400, Phillip J. Eby wrote: > > Also, maybe in 2.5 we could begin warning about bare excepts that aren't > preceded by non-bare exceptions.
try: foo() except: printorlogexceptioninawaythatismeaningful() raise doesn't seem to be incorrect to me. For example, if the program is a daemon, I want the exception logged somewhere so that I can see it later, because I won't be watching stderr.
If the exception raised is a MemoryError, your daemon is in trouble.
I said warn, and it'd be easy to suppress the warning using 'except Exception:', if that's what you really mean
But I suppose this could be considered a job for pychecker.
- Previous message: [Python-Dev] Proposing a sys.special_exceptions tuple
- Next message: [Python-Dev] [OT] stats on type-inferencing atomic types in local variables in the stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]