On Fri, 01 Jan 2010 11:34:19 +0100 "Martin v. Loewis"
<mar...@v.loewis.de> wrote:

> Your observation is not wrong, but, as Benjamin already explained,
> you are misinterpreting Michi Henning's statement. He doesn't condemn
> exception handling per se, but only for the handling of *expected*
> outcomes. He would consider using exceptions fine for *exceptional*
> output, and that is exactly the way they are used in the Python API.

May I point out at this point that "exceptional" does not mean
"unexpected"? You catch exceptions, not unexpectations. An exception
is rare, but not surprising. Case in point: StopIteration.

To put it differently: When you write "catch DeadParrot", you certainly
expect to get a DeadParrot once in a while -- why else would you get it
in your head to try and catch it? An unexpected exception is the one
that crashes your program.

/W

-- 
INVALID? DE!

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to