Message9301
Logged In: YES
user_id=56214
Just to make things even more interesting, the current
'raise' code *will* let you raise a new-style instance that
derives from 'tuple'... of course, what it actually raises
is the first element of said tuple-like thing.
It seems to me that the very first thing that should be
checked is whether the first argument to 'raise' is an
instance of Exception, and if so, take its type and go from
there. This would support both old and new-style instances
of Exception subclasses, and I believe is the recommended
approach to using 'raise'. (I.e., raise an instance of
something that subclasses Exception.) All the other items
like strings, tuples, etc., should be checked *after* a
check for the "standard" approach, yes?
|
|
Date |
User |
Action |
Args |
2007-08-23 13:59:16 | admin | link | issue518846 messages |
2007-08-23 13:59:16 | admin | create | |
|