MCPcopy Index your code
hub / github.com/ipython/ipython / __call__

Method __call__

IPython/core/formatters.py:758–772  ·  view source on GitHub ↗

Compute the pretty representation of the object.

(self, obj)

Source from the content-addressed store, hash-verified

756
757 @catch_format_error
758 def __call__(self, obj):
759 """Compute the pretty representation of the object."""
760 if not self.pprint:
761 return repr(obj)
762 else:
763 stream = StringIO()
764 printer = pretty.RepresentationPrinter(stream, self.verbose,
765 self.max_width, self.newline,
766 max_seq_length=self.max_seq_length,
767 singleton_pprinters=self.singleton_printers,
768 type_pprinters=self.type_printers,
769 deferred_pprinters=self.deferred_printers)
770 printer.pretty(obj)
771 printer.flush()
772 return stream.getvalue()
773
774
775class HTMLFormatter(BaseFormatter):

Callers

nothing calls this directly

Calls 2

prettyMethod · 0.95
flushMethod · 0.45

Tested by

no test coverage detected