improper position of continue?

Robin Becker robin at jessikat.fsnet.co.uk
Wed Aug 2 14:43:36 EDT 2000


In article <8m9kup$e4q$1 at slb1.atl.mindspring.net>, Andrew Dalke
<dalke at acm.org> writes
>Cezar Ionescu wrote
>>Quoting from the language reference manual:
>
>> The restriction
>>        on occurring in the try clause is implementer's laziness and
>>        will eventually be lifted.
>
>Guido has said that the compiler doesn't have enough information
>to handle continue inside of a try block, and he decided that
>it was less work to answer the question once every year on the
>newsgroup when it comes up than to rewrite that code.
>
>He has also pointed out that JPython handles that case correctly.
>
>                    Andrew
>                    dalke at acm.org

So all the claims that Python is regular clean etc etc depend on the
ability of the chief designer to get it right every time. Come on GvR,
assign a minion to do this!

If one can get

def dumbo():
        while 1:
                try:
                        print 'hello',
                        return
                finally:
                        print 'finally'
        print 'ending'

to work it shouldn't be that difficult to have a continue exit from a
try block.
-- 
Robin Becker



More information about the Python-list mailing list