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

Function pretty

IPython/lib/pretty.py:136–144  ·  view source on GitHub ↗

Pretty print the object's representation.

(obj, verbose=False, max_width=79, newline='\n', max_seq_length=MAX_SEQ_LENGTH)

Source from the content-addressed store, hash-verified

134 return items
135
136def pretty(obj, verbose=False, max_width=79, newline='\n', max_seq_length=MAX_SEQ_LENGTH):
137 """
138 Pretty print the object's representation.
139 """
140 stream = StringIO()
141 printer = RepresentationPrinter(stream, verbose, max_width, newline, max_seq_length=max_seq_length)
142 printer.pretty(obj)
143 printer.flush()
144 return stream.getvalue()
145
146
147def pprint(obj, verbose=False, max_width=79, newline='\n', max_seq_length=MAX_SEQ_LENGTH):

Callers 1

getsourceFunction · 0.90

Calls 3

prettyMethod · 0.95
flushMethod · 0.45

Tested by

no test coverage detected