Re: [Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

2005-08-27 Thread skip
MAL> I don't see a need for two or more syntaxes either, but most code MAL> nowadays uses the second variant (I don't know of any code that MAL> uses the traceback argument), which puts up a high barrier for MAL> changes. Earlier this week I managed to fix all the instances in the

Re: [Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

2005-08-26 Thread Michael Chermside
Marc-Andre Lemburg writes: > This is from a comment in ceval.c: > > /* We support the following forms of raise: > raise , > raise , > raise , None > raise , > raise , None > raise , > raise , None > > An omitted secon

Re: [Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

2005-08-26 Thread M.-A. Lemburg
Guido van Rossum wrote: > On 8/25/05, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > >>I must have missed this one: >> >> >>> >>>Style for raising exceptions >>> >>> >>>Guido explained that these days exceptions should always be raised as:: >>> >

Re: [Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

2005-08-25 Thread Guido van Rossum
On 8/25/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I do have a followup question on the style thing. (I'll leave others to > answer MAL's question about optimization.) If I want to raise an exception > without an argument, which of the following is the proper form? > > raise ValueErr

Re: [Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

2005-08-25 Thread skip
MAL> I must have missed this one: That's because it was brief and to the point, so the discussion lasted for maybe three messages. Also, someone told us you were on holiday so we thought we could squeak it through without you noticing. Darn those Aussies. Late on the pydev summary again!

Re: [Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

2005-08-25 Thread Guido van Rossum
On 8/25/05, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: > I must have missed this one: > > > > > Style for raising exceptions > > > > > > Guido explained that these days exceptions should always be raised as:: > > > > raise SomeException("

Re: [Python-Dev] Style for raising exceptions (python-dev Summary for 2005-08-01 through 2005-08-15 [draft])

2005-08-25 Thread M.-A. Lemburg
I must have missed this one: > > Style for raising exceptions > > > Guido explained that these days exceptions should always be raised as:: > > raise SomeException("some argument") > > instead of:: > > raise SomeException, "some