def catch(func, *args, handle=lambda e : None, **kwargs): try: return func(*args, **kwargs) except Exception as e: return handle(e)