Code review comment for lp:~spiv/bzr/cleanup-hof

Revision history for this message
Vincent Ladeuil (vila) wrote :

>>>>> "Andrew" == Andrew Bennetts <email address hidden> writes:

    Andrew> [Trying an RFC for a branch by cross-posting to both the merge proposal on
    Andrew> Launchpad, and the bazaar@ list.]

    Andrew> Hi all,

    Andrew> Here's the problem. In this example, Python gives no way for final_func to know
    Andrew> if try_func raised an error or not:

    Andrew> try:
    Andrew> try_func()
    Andrew> finally:
    Andrew> final_func()

try:
   no_error = False
   try_func()
   no_error = True
finally:
   final_func(no_error)

« Back to merge proposal