
Aug. 17, 2004
1:11 a.m.
James Y Knight wrote:
One issue is that creating a new category of Exceptions doesn't help people who do "except:" instead of "except Exception:". It is unlikely that person meant to catch things like MemoryError, rather, they were just being lazy. I suppose that syntax could be deprecated, at least in example code and documentation, in favor of "except Exception" for the usual case, and "except Raisable" for the cases where you do actually want to catch everything*.
Personally, I would be in favour of a bare except being equivalent in new code to 'except Exception'. Although this does violate 'in the presence of ambiguity, resist the temptation to guess'. Tim Delaney