Preferred exception style?

Dave Benjamin ramen at lackingtalent.com
Fri May 30 13:12:02 EDT 2003


Hey folks,

I was just wondering which style you prefer for raising exceptions. I never
really thought about it much, but I was looking at some code today that said:

raise SomeException, 'some relevant message'

and I tend to do it like this:

raise SomeException('some relevant message')

The two forms seem to have identical results. Any reason to prefer one over
the other? Which do you use?

Thanks,
Dave




More information about the Python-list mailing list