def tryit(rule):
 def try_rl(expr):
  try:
   return rule(expr)
  except Exception:
   return expr
 return try_rl

def tryit ( rule ) : def try_rl ( expr ) : try : return rule ( expr ) except Exception : return expr return try_rl
return original expr if rule raises exception .