def action(): yield successful_action() yield reversible.lift( make_future(exc=MyException('future failed')) )
def action(): value = yield reversible.lift(make_future(42)) assert value == 42 yield failing_action()
def action(): yield successful_action() value = yield reversible.lift(make_future(42)) raise reversible.Return(value)