Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Phillip J. Eby
At 03:58 PM 3/24/2006 -0800, Guido van Rossum wrote: >OK, I give up. I'm giving you a -1 on the test for a non-empty >traceback without explaining it further. Not a problem; I just wanted to make sure you were rejecting the same thing that I was proposing. :) I've checked in the "your way" vers

Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Guido van Rossum
OK, I give up. I'm giving you a -1 on the test for a non-empty traceback without explaining it further. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/list

Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Phillip J. Eby
At 03:23 PM 3/24/2006 -0800, Guido van Rossum wrote: >And I see no reason to complicate the code with an additional check >that doesn't serve a purpose. The purpose of reminding people not to >write g.throw("abc") seems artificial to me. I'd rather see less code, >meaning less maintenance, and no n

Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Guido van Rossum
On 3/24/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > Okay - so allow them without warning or error, even if somebody does > 'gen.throw("abc")'? Correct. There's no current code that does this, and I doubt that few people will write any, so I don't see the value of trying to trap or warn for thi

Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Phillip J. Eby
At 03:06 PM 3/24/2006 -0800, Guido van Rossum wrote: >On 3/24/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > > At 03:04 PM 3/24/2006 -0800, Guido van Rossum wrote: > > >The current state is that it always allows them, right? > > > > No. It doesn't allow them. Support for string exceptions was ne

Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Guido van Rossum
On 3/24/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 03:04 PM 3/24/2006 -0800, Guido van Rossum wrote: > >The current state is that it always allows them, right? > > No. It doesn't allow them. Support for string exceptions was never > actually implemented; I'm trying to implement it now. O

Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Phillip J. Eby
At 03:04 PM 3/24/2006 -0800, Guido van Rossum wrote: >The current state is that it always allows them, right? No. It doesn't allow them. Support for string exceptions was never actually implemented; I'm trying to implement it now. ___ Python-Dev mail

Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Guido van Rossum
On 3/24/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 02:36 PM 3/24/2006 -0800, Guido van Rossum wrote: > >I think it's overkill to warn for any string exceptions thrown this > >way. Since the only use case for using throw() is to pass an exception > >you just caught, I don't see that putting

Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Phillip J. Eby
At 02:36 PM 3/24/2006 -0800, Guido van Rossum wrote: >I think it's overkill to warn for any string exceptions thrown this >way. Since the only use case for using throw() is to pass an exception >you just caught, I don't see that putting the warning is useful -- >it's just more code that in practice

Re: [Python-Dev] PEP 342 support for string exceptions in throw()

2006-03-24 Thread Guido van Rossum
On 3/24/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > Should geniter.throw() issue a deprecation warning for string exceptions? > > My first thought was yes, since that's what raise() does. > > On the other hand, one of the key motivating uses for throw() is to allow > exception propagation on a