Logged In: YES
user_id=179604
Raymond, I really appreciate your patches. The big patch is
terrific and gets my vote. I do have one more request for
clarification in what you wrote. You say:
"If the first expression is a class object, it raises the
exception identified by the class of an instance determined
by the second expression. If the second expression is an
instance, that instance is used."
So we're talking about the form: raise class, instance
What I'm picturing is a situation where the second
expression is an instance of a class other than the class
object used as the first expression. Is this allowed,
disallowed, allowed but nonsensical or allowed because it
offers some practical benefit that I'm just not grasping?
I found and read the essay on "Standard Exception Classes
in Python 1.5"
(http://www.python.org/doc/essays/stdexceptions.html) and I
can see that much was done to maintain backward
compatibility. and apparently the "raise class, instance"
form goes back quite a ways. Is this just a wart to be
avoided? I'm probably expecting too much to expect the
language reference to distinguish between what is strictly
allowed vs. why it is allowed and whether it should even be
used at all. It's just that the more I dug into this the
more confused I became. I think I'm understanding the
situation now.
In any case, make of this what you will. The bottom line is
that your batch is definitely an improvement and I greatly
appreciate your time and effort on this. Thanks.
|