Re: [Python-Dev] more pyref: continue in finally statements

2006-05-02 Thread Michael Urman
On 5/1/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > then what should be the meaning of "continue" here? The finally > block *eventually* needs to re-raise the exception. When should > that happen? It should behave similarly to return and swallow the exception. In your example this would resu

Re: [Python-Dev] more pyref: continue in finally statements

2006-05-01 Thread Martin v. Löwis
Fredrik Lundh wrote: > the language reference says: > > continue may only occur syntactically nested in a for or while loop, > but not nested in a function or class definition or finally statement > within that loop. /.../ > > It may occur within an except or else clause. The rest

Re: [Python-Dev] more pyref: continue in finally statements

2006-05-01 Thread Martin v. Löwis
Guido van Rossum wrote: > Strange. I thought this was supposed to be fixed? (But I can confirm > that it isn't.) Perhaps you were confusing it with this HISTORY entry? - A 'continue' statement can now appear in a try block within the body of a loop. It is still not possible to use continue in

Re: [Python-Dev] more pyref: continue in finally statements

2006-05-01 Thread Guido van Rossum
Strange. I thought this was supposed to be fixed? (But I can confirm that it isn't.) BTW there's another bug in the compiler: it doesn't diagnose this inside "while 0". --Guido On 5/1/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > the language reference says: > > continue may only occur synt

[Python-Dev] more pyref: continue in finally statements

2006-05-01 Thread Fredrik Lundh
the language reference says: continue may only occur syntactically nested in a for or while loop, but not nested in a function or class definition or finally statement within that loop. /.../ It may occur within an except or else clause. The restriction on occurring in the try