call-seq:
    format_obj( obj )

 Return a string representation of the given object. Depending upon
 the configuration of the logger system the format will be an +inspect+
 based representation or a +yaml+ based representation.
345285
def format_obj( obj )
    case obj
    when String; obj
    when Exception
      str = "<#{obj.class.name}> #{obj.message}"
      if @backtrace && !obj.backtrace.nil?
        str << "\n\t" << obj.backtrace.join("\n\t")
      end
      str
    when nil; "<#{obj.class.name}> nil"
    else
      str = "<#{obj.class.name}> "
      str << case @obj_format
             when :inspect; obj.inspect
             when :yaml; try_yaml(obj)
             when :json; try_json(obj)
             else obj.to_s end
      str
    end
  end
627854
def format_repr(obj, attributes) -> str:
    """"""

    attribute_repr = ', '.join(('{}={}'.format(attr, repr(getattr(obj, attr)))
                                for attr in attributes))
    return "{0}({1})".format(obj.__class__.__qualname__, attribute_repr)
281882
def format(self, format_spec='f'):
        
        """
        if format_spec == '' or format_spec == 'f':
            cnpj = CNPJ.clean(self._cnpj)
            return '{0}.{1}.{2}/{3}-{4}'.format(cnpj[0:2], cnpj[2:5], cnpj[5:8], cnpj[8:12], cnpj[12:14])
        if format_spec == 'r':
            return self._cnpj
        raise ValueError(
            "Unknown format code '{0}' for object of type '{1}'".format(format_spec, CNPJ.__name__))
677327
def serialize(obj, **options):
    '''
    
    '''

    options.setdefault('Dumper', Dumper)
    try:
        response = yaml.dump(obj, **options)
        if response.endswith('\n...\n'):
            return response[:-5]
        if response.endswith('\n'):
            return response[:-1]
        return response
    except Exception as error:
        log.exception('Error encountered while serializing')
        raise SerializationError(error)
1339231
def value_to_string(self, obj):
        
        value = self.value_from_object(obj)
        return self.get_prep_value(value)
1353561
private Object formatVerboseObj(Object obj) {
        // Make sure that we don't truncate any stack traces during verbose logging

        if (obj instanceof TruncatableThrowable) {
            TruncatableThrowable truncatable = (TruncatableThrowable) obj;
            final Throwable wrappedException = truncatable.getWrappedException();
            return DataFormatHelper.throwableToString(wrappedException);
        } else if (obj instanceof Throwable) {
            return DataFormatHelper.throwableToString((Throwable) obj);
        }
        return null;
    }
61403
def format_field_names(obj, format_type=None):
    
    if format_type is None:
        format_type = json_api_settings.FORMAT_FIELD_NAMES

    if isinstance(obj, dict):
        formatted = OrderedDict()
        for key, value in obj.items():
            key = format_value(key, format_type)
            formatted[key] = value
        return formatted

    return obj
593525
def pretty_print(self, obj):
        
        s = repr(obj)
        limit = output_limit()
        if len(s) > limit:
            if self.dom_term:
                s = self.color.py_syntax_highlight(s)
                s = self.dom_term.fold_text_string("", s)
            else:
                s = s[:limit - 3]  # cut before syntax highlighting, to avoid missing color endings
                s = self.color.py_syntax_highlight(s)
                s += "..."
        else:
            s = self.color.py_syntax_highlight(s)
        extra_info = self._pp_extra_info(obj)
        if extra_info != "":
            s += ", " + self.color.py_syntax_highlight(extra_info)
        return s
1078647
def make_string(obj):
    
    if inspect.isclass(obj):
        if issubclass(obj, Object):
            return obj._ROOT.__name__
        if issubclass(obj, string_types):
            return 'string'
        return obj.__name__
    if not isinstance(obj, string_types):
        raise TypeError("expected string or class")
    return obj
617624
def format( event )
      obj = format_obj(event.data)
      sprintf("%*s  %s : %s\n", ::Logsly::Logging182::MAX_LEVEL_LENGTH,
              ::Logsly::Logging182::LNAMES[event.level], event.logger, obj)
    end
1305408
public String format(Object number) {
         synchronized (fmt) {
             return style.format(
                     fmt.formatToCharacterIterator(number),
                     preExponent);
         }
     }
277607
function gettype(obj) {
  var type = typeof obj;

  if (type !== 'object') {
    return type;
  }

  // inspect [[Class]] for objects
  return toString.call(obj)
    .replace(objectRegExp, '$1');
}
9907
def format_match(self, obj):
        
        result = [escape(obj.name)]

        if obj.description:
            result.append(escape(obj.description))

        return " ".join(result)
881965
function getFormat(syntax, options) {
	let format = syntaxFormat[syntax];
	if (typeof format === 'string') {
		format = syntaxFormat[format];
	}

	return Object.assign({}, format, options && options.format);
}
1003404
def pretty_json(obj):
    
    return json.dumps(obj, sort_keys=True, indent=4, separators=(',', ': '), ensure_ascii=False)
644664
def pretty(self, obj=None, display=True):
        
        ret = self._format_obj(obj if obj is not None else self.obj)
        if display:
            print(ret)
        else:
            return ret
233547
def get_object_as_string(obj):
    
    if isinstance(obj, str):
        return obj
    if isinstance(obj, list):
        return '\r\n\;'.join([get_object_as_string(item) for item in obj])
    attrs = vars(obj)
    as_string = ', '.join("%s: %s" % item for item in attrs.items())
    return as_string