def _safe_str(obj):
 try:
  return str(obj)
 except Exception:
  return object.__str__(obj)

def _safe_str ( obj ) : try : return str ( obj ) except Exception : return object . __str__ ( obj )
helper for assert_* ports .