Josiah Carlson wrote:
> Dino Viehland <[EMAIL PROTECTED]> wrote:
>> 
>> We've been working on fixing some exception handling bugs in
>> IronPython where we differ from CPython.  Along the way we ran into
>> this issue which causes CPython to crash when the code below is run.
>> It crashes on both 2.4 and 2.5 beta 3.  The code's technically illegal,
>> but it probably shouldn't crash either :)
> 
>> def test():
>>     for abc in range(10):
>>         try: pass
>>         finally:
>>             try:
>>                 continue
>>             except:
>>                 pass
>> 
>> 
>> test()
> 
> It also reliably crashes 2.3, though I don't see anything in there as
> being illegal, but maybe I don't understand the langauge as well as I
> think I do.

"continue" is not supported inside a finally clause. If you put the
continue directly there or into the except clause, the compiler will
tell you.

It looks like nobody thought about that corner case when writing the
compiler check for continue.

Georg

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to