I'm coming from Tcl-world ...

Daniel Fackrell unlearned at DELETETHIS.learn2think.org
Tue Aug 6 15:40:11 EDT 2002


"Andreas Leitgeb" <Andreas.Leitgeb at siemens.at> wrote in message
news:slrnal09pv.c05.Andreas.Leitgeb at pc7499.gud.siemens.at...
> Daniel Fackrell <unlearned at DELETETHIS.learn2think.org> wrote:
> >         try:
> >                 continue
>
> once, I tried it,  continue didn't work inside a try.
>  the python-compiler refused to compile it.
>
> next try ?


Not sure what you're getting, then, but this works under Python 2.2 in IDLE:

>>> x=0
>>> while x < 10:
    x += 1
    try:
        print 'continue'
        continue
        print 'break'
        break
    except:
        print 'except'
        break

continue
continue
continue
continue
continue
continue
continue
continue
continue
continue
>>>

--
Daniel Fackrell (unlearned at learn2think.org)
When we attempt the impossible, we can experience true growth.





More information about the Python-list mailing list