Re: raise Exception or raise Exception()

2010-11-14 Thread Roy Smith
In article , Chris Rebert wrote: > On Sun, Nov 14, 2010 at 8:58 AM, ernest wrote: > > I have seen both forms and I'm not sure if they're > > both correct, or one is right and the other wrong. > > They're both acceptable (although obviously you should always raise a > more specific error than E

Re: raise Exception or raise Exception()

2010-11-14 Thread Chris Rebert
On Sun, Nov 14, 2010 at 8:58 AM, ernest wrote: > I have seen both forms and I'm not sure if they're > both correct, or one is right and the other wrong. They're both acceptable (although obviously you should always raise a more specific error than Exception). `raise SomeException` is in fact equi

raise Exception or raise Exception()

2010-11-14 Thread ernest
I have seen both forms and I'm not sure if they're both correct, or one is right and the other wrong. In practical terms, the two of them seem to have the same effect. Cheers, Ernest -- http://mail.python.org/mailman/listinfo/python-list