
March 28, 2002
10:25 a.m.
Skip Montanaro <skip@pobox.com> writes:
Guido> One other, more practical reason to like the rule: "except Guido> Exception:" would become equivalent to "except:".
Just to make sure I'm not missing something (I probably am), I still think the recommended catch-all except construct should become "except StandardError:" with KeyboardInterrupt migrated to inherit from Exception instead of StandardError.
That is indeed a different issue. If you want to catch everything (including KeyboardInterrupt), you need an except: clause, in which case it is difficult to get at the exception object. Regards, Martin