MCPcopy Create free account
hub / github.com/ipython/ipython / _repr_pprint

Function _repr_pprint

IPython/lib/pretty.py:697–706  ·  view source on GitHub ↗

A pprint that just redirects to the normal repr function.

(obj, p, cycle)

Source from the content-addressed store, hash-verified

695
696
697def _repr_pprint(obj, p, cycle):
698 """A pprint that just redirects to the normal repr function."""
699 # Find newlines and replace them with p.break_()
700 output = repr(obj)
701 lines = output.splitlines()
702 with p.group():
703 for idx, output_line in enumerate(lines):
704 if idx:
705 p.break_()
706 p.text(output_line)
707
708
709def _function_pprint(obj, p, cycle):

Callers 3

prettyMethod · 0.85
_default_pprintFunction · 0.85
_type_pprintFunction · 0.85

Calls 3

groupMethod · 0.80
break_Method · 0.80
textMethod · 0.45

Tested by

no test coverage detected