ANNOUNCE: 'goto' for Python
Bill
address at is.invalid
Fri Apr 2 12:32:08 EST 2004
"Richie Hindle" <richie at entrian.com> wrote in message
news:mailman.210.1080803438.20120.python-list at python.org...
--snip--
> 'comefrom' example: letting cleanup code take control after an error.
>
> from goto import comefrom, label
> def bigFunction():
> setUp()
> if not doFirstTask():
> label .failed
> if not doSecondTask():
> label .failed
> if not doThirdTask():
> label .failed
>
> comefrom .failed
> cleanUp()
Hello,
Can you explain to me why you need comefrom? Couldn't you replace
"label.failed" with "goto cleanup"? Thanks.
Louis
More information about the Python-list
mailing list