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

Function pprint

Lib/pprint.py:46–54  ·  view source on GitHub ↗

Pretty-print a Python object to a stream [default is sys.stdout].

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

Source from the content-addressed store, hash-verified

44
45
46def pprint(object, stream=None, indent=1, width=80, depth=None, *,
47 compact=False, expand=False, sort_dicts=True,
48 underscore_numbers=False):
49 """Pretty-print a Python object to a stream [default is sys.stdout]."""
50 printer = PrettyPrinter(
51 stream=stream, indent=indent, width=width, depth=depth,
52 compact=compact, expand=expand, sort_dicts=sort_dicts,
53 underscore_numbers=underscore_numbers)
54 printer.pprint(object)
55
56
57def pformat(object, indent=1, width=80, depth=None, *,

Callers 2

dump_eventMethod · 0.90
ppFunction · 0.70

Calls 2

pprintMethod · 0.95
PrettyPrinterClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…