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

Function pformat

Lib/pprint.py:57–63  ·  view source on GitHub ↗

Format a Python object into a pretty-printed representation.

(object, indent=1, width=80, depth=None, *,
            compact=False, expand=False, sort_dicts=True,
            underscore_numbers=False)

Source from the content-addressed store, hash-verified

55
56
57def pformat(object, indent=1, width=80, depth=None, *,
58 compact=False, expand=False, sort_dicts=True,
59 underscore_numbers=False):
60 """Format a Python object into a pretty-printed representation."""
61 return PrettyPrinter(indent=indent, width=width, depth=depth,
62 compact=compact, expand=expand, sort_dicts=sort_dicts,
63 underscore_numbers=underscore_numbers).pformat(object)
64
65
66def pp(object, *args, sort_dicts=False, **kwargs):

Callers 1

stringifyFunction · 0.90

Calls 2

PrettyPrinterClass · 0.85
pformatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…