Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
def def def solution in Clear category for Compare Functions by veky
def checkio(*funcs):
def result(*args, **kwargs):
def ignore_exc(k):
try: return k(*args, **kwargs)
except Exception: pass
fr, gr = map(ignore_exc, funcs)
if fr is gr is None: return None, 'both_error'
elif fr is None: return gr, 'f_error'
elif gr is None: return fr, 'g_error'
else: return fr, 'same' if fr == gr else 'different'
return result
May 30, 2016