def is_string_like(obj):
if isinstance(obj, str): return True<EOL>if ma.isMaskedArray(obj):<EOL><INDENT>if obj.ndim == <NUM_LIT:0> and obj.dtype.kind in '<STR_LIT>':<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>try: obj + '<STR_LIT>'<EOL>except (TypeError, ValueError): return False<EOL>return True<EOL>
Return True if *obj* looks like a string