MCPcopy Index your code
hub / github.com/python/cpython / format

Method format

Lib/pprint.py:633–638  ·  view source on GitHub ↗

Format object for a specific context, returning a string and flags indicating whether the representation is 'readable' and whether the object represents a recursive construct.

(self, object, context, maxlevels, level)

Source from the content-addressed store, hash-verified

631 return repr
632
633 def format(self, object, context, maxlevels, level):
634 """Format object for a specific context, returning a string
635 and flags indicating whether the representation is 'readable'
636 and whether the object represents a recursive construct.
637 """
638 return self._safe_repr(object, context, maxlevels, level)
639
640 def _pprint_default_dict(self, object, stream, indent, allowance, context, level):
641 if not len(object):

Callers 4

isrecursiveMethod · 0.95
isreadableMethod · 0.95
_reprMethod · 0.95
_safe_reprMethod · 0.95

Calls 1

_safe_reprMethod · 0.95

Tested by

no test coverage detected