Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
any number of functions solution in Clear category for Compare Functions by DiZ
def checkio(*funcs):
def helper(*args, **kwargs):
output = result = None
status = "same"
for i, f in enumerate(funcs, ord('f')):
try: result = f(*args, **kwargs)
except: result = None
if result == None:
status = [chr(i), "both"]["error" in status] + "_error"
elif output == None: output = result
elif result != output: status = "different"
return output, status
return helper
April 5, 2016
Comments: