Message124836
| Author |
ethan.furman |
| Recipients |
draghuram, ethan.furman, mrabarnett, ncoghlan, pitrou, poke, rhettinger, steven.daprano |
| Date |
2010年12月29日.01:15:24 |
| SpamBayes Score |
3.689803e-07 |
| Marked as misclassified |
No |
| Message-id |
<1293585326.55.0.268905833222.issue6210@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> I'm talking about the exception raised from the except block.
So was I -- why should this:
try:
x = y / z
except ZeroDivisionError as exc:
raise InvalidInput()
be different from this:
try:
x = divide_and_conquer(y, z)
except ZeroDivisionError as exc:
raise InvalidInput()
?
In both cases I want to discard the previous exception, and raise my own in its place (without the nesting, in this example). |
|