Re: [Python-Dev] PEP 8: exception style

2005-08-07 Thread Guido van Rossum
> > Maybe in Py3K this could become > > > > raise ValueError("bloop"), tb > > The instantiation and bindings need to be done in one step without > mixing two syntaxes. Treat this case the same as everything else: > > raise ValueError("blip", traceback=tb) That requires PEP 344. I have some vagu

Re: [Python-Dev] PEP 8: exception style

2005-08-07 Thread Raymond Hettinger
> > How do you then supply a traceback to the raise statement? > > raise ValueError, ValueError("blah"), tb > > Maybe in Py3K this could become > > raise ValueError("bloop"), tb The instantiation and bindings need to be done in one step without mixing two syntaxes. Treat this case the same as

Re: [Python-Dev] PEP 8: exception style

2005-08-07 Thread Guido van Rossum
> How do you then supply a traceback to the raise statement? raise ValueError, ValueError("blah"), tb Maybe in Py3K this could become raise ValueError("bloop"), tb -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailin

Re: [Python-Dev] PEP 8: exception style

2005-08-07 Thread Michael Hudson
Guido van Rossum <[EMAIL PROTECTED]> writes: > On 8/6/05, A.M. Kuchling <[EMAIL PROTECTED]> wrote: >> PEP 8 doesn't express any preference between the >> two forms of raise statements: >> raise ValueError, 'blah' >> raise ValueError("blah") >> >> I like the second form better, because if the exce

Re: [Python-Dev] PEP 8: exception style

2005-08-06 Thread Brett Cannon
On 8/6/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 8/6/05, A.M. Kuchling <[EMAIL PROTECTED]> wrote: > > PEP 8 doesn't express any preference between the > > two forms of raise statements: > > raise ValueError, 'blah' > > raise ValueError("blah") > > > > I like the second form better, becau

Re: [Python-Dev] PEP 8: exception style

2005-08-06 Thread Terry Reedy
"Guido van Rossum" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 8/6/05, A.M. Kuchling <[EMAIL PROTECTED]> wrote: >> PEP 8 doesn't express any preference between the >> two forms of raise statements: >> raise ValueError, 'blah' >> raise ValueError("blah") >> >> I like the secon

Re: [Python-Dev] PEP 8: exception style

2005-08-06 Thread Guido van Rossum
On 8/6/05, A.M. Kuchling <[EMAIL PROTECTED]> wrote: > PEP 8 doesn't express any preference between the > two forms of raise statements: > raise ValueError, 'blah' > raise ValueError("blah") > > I like the second form better, because if the exception arguments are > long or include string formattin

Re: [Python-Dev] PEP 8: exception style

2005-08-06 Thread Robert Brewer
A.M. Kuchling wrote: > PEP 8 doesn't express any preference between the > two forms of raise statements: > raise ValueError, 'blah' > raise ValueError("blah") > > I like the second form better, because if the exception arguments are > long or include string formatting, you don't need to use line

[Python-Dev] PEP 8: exception style

2005-08-06 Thread A.M. Kuchling
PEP 8 doesn't express any preference between the two forms of raise statements: raise ValueError, 'blah' raise ValueError("blah") I like the second form better, because if the exception arguments are long or include string formatting, you don't need to use line continuation characters because of