3 ms·
We solved this by introducing a Result library. load("@.../result", result=result) def throw(arg): return 1/0 if result.Result(throw).map(arg).
by mahmoudimus 2y ago
We solved this by introducing a Result library.
load("@.../result", result=result)
def throw(arg):
return 1/0
if result.Result(throw).map(arg).is_ok:
# proceed
else:
fail("...")