Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Guido van Rossum
On 2/28/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > Notice that these semantics break some of the PEP examples. For > example, the 'locked' and 'nested' classes now suppress exceptions, > and it took a non-trivial study of their code to determine > this. This seems to suggest that making supp

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Phillip J. Eby
At 04:01 PM 2/28/2006, Guido van Rossum wrote: >On 2/28/06, Nick Coghlan <[EMAIL PROTECTED]> wrote: > > Guido van Rossum wrote: > > > I just realized that there's a bug in the with-statement as currently > > > checked in. __exit__ is supposed to re-raise the exception if there > > > was one; if it

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Nick Coghlan
Guido van Rossum wrote: >> If you changed your mind along the way, that should probably be explained in >> the PEP somewhere :) > > I don't know that PEPs benefit from too much "on the one hand, on the > other hand, on the third hand" or "and then I changed my mind, and > then I changed it back, a

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Guido van Rossum
On 2/28/06, Nick Coghlan <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > I just realized that there's a bug in the with-statement as currently > > checked in. __exit__ is supposed to re-raise the exception if there > > was one; if it returns normally, the finally clause is NOT to re-raise

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Nick Coghlan
Guido van Rossum wrote: > I just realized that there's a bug in the with-statement as currently > checked in. __exit__ is supposed to re-raise the exception if there > was one; if it returns normally, the finally clause is NOT to re-raise > it. The fix is relatively simple (I believe) but requires

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Guido van Rossum
On 2/28/06, Mike Bland <[EMAIL PROTECTED]> wrote: > On 2/28/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On 2/28/06, Mike Bland <[EMAIL PROTECTED]> wrote: > > > On 2/28/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > > I just realized that there's a bug in the with-statement as current

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Mike Bland
On 2/28/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 2/28/06, Mike Bland <[EMAIL PROTECTED]> wrote: > > On 2/28/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > I just realized that there's a bug in the with-statement as currently > > > checked in. __exit__ is supposed to re-raise the

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Guido van Rossum
On 2/28/06, Mike Bland <[EMAIL PROTECTED]> wrote: > On 2/28/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > I just realized that there's a bug in the with-statement as currently > > checked in. __exit__ is supposed to re-raise the exception if there > > was one; if it returns normally, the fina

Re: [Python-Dev] with-statement heads-up

2006-02-28 Thread Mike Bland
On 2/28/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > I just realized that there's a bug in the with-statement as currently > checked in. __exit__ is supposed to re-raise the exception if there > was one; if it returns normally, the finally clause is NOT to re-raise > it. The fix is relatively

[Python-Dev] with-statement heads-up

2006-02-28 Thread Guido van Rossum
I just realized that there's a bug in the with-statement as currently checked in. __exit__ is supposed to re-raise the exception if there was one; if it returns normally, the finally clause is NOT to re-raise it. The fix is relatively simple (I believe) but requires updating lots of unit tests. It'