Exceptions' Behaviour

Tom Good Tom_Good1 at excite.com
Thu Jul 19 14:06:02 EDT 2001


Martin Sj?ren <martin at strakt.com> wrote in message news:<mailman.995526636.21726.python-list at python.org>...
> On Wed, Jul 18, 2001 at 11:58:43AM -0700, Tom Good wrote:
> > Martin Sj?ren <martin at strakt.com> wrote in message news:<mailman.995459
> 309.19355.python-list at python.org>...
> 

[snip]

> 
> Yes I know that, but that's not what I'm asking. What I'm asking is why i
> n
> 
> >>> raise ("a","b")
> 
> the "b" disappears? IMO that's a pretty weird behaviour. Yes anybody usin
> g
> non-class exceptions derived from Exception in a real-world program are
> insane, but this is a puristic thing of mine. :-)
> 
> Martin

I agree, it is kind of weird, and I don't know why it works that way. 
I would probably expect trying to raise a tuple to generate an error.


Tom



More information about the Python-list mailing list