def call(func, value=None): call_stack.append(func) result, error = _pause((func, value)) if error: raise error return result
def pause(value=None): call_stack.pop() return _pause((call_stack[-1], value))