You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know, this thing was an open an shut case in ramda.js (ramda/ramda#1317) and it would be much nicer to handle this kind of control flow with a Maybe type. But since no such thin exists in python afaik, how about we sidestep and implement something like this anyway?
defraise(e):
deffoo(*_):
raise(e)
returnfoo
I for sure would find it useful.
Cheers!
The text was updated successfully, but these errors were encountered:
@jakobkolb raise is already a function in python. Why do you need this if you can R.when(R.identity, lambda: raise(Exception("It's an error"))('error?')
I know, this thing was an open an shut case in ramda.js (ramda/ramda#1317) and it would be much nicer to handle this kind of control flow with a
Maybe
type. But since no such thin exists in python afaik, how about we sidestep and implement something like this anyway?I for sure would find it useful.
Cheers!
The text was updated successfully, but these errors were encountered: