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 finally clause

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 exception if

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 currently checked

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 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, and then I