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

Method __call__

IPython/core/formatters.py:690–704  ·  view source on GitHub ↗

Compute the pretty representation of the object.

(self, obj)

Source from the content-addressed store, hash-verified

688
689 @catch_format_error
690 def __call__(self, obj):
691 """Compute the pretty representation of the object."""
692 if not self.pprint:
693 return repr(obj)
694 else:
695 stream = StringIO()
696 printer = pretty.RepresentationPrinter(stream, self.verbose,
697 self.max_width, self.newline,
698 max_seq_length=self.max_seq_length,
699 singleton_pprinters=self.singleton_printers,
700 type_pprinters=self.type_printers,
701 deferred_pprinters=self.deferred_printers)
702 printer.pretty(obj)
703 printer.flush()
704 return stream.getvalue()
705
706
707class HTMLFormatter(BaseFormatter):

Callers

nothing calls this directly

Calls 2

prettyMethod · 0.95
flushMethod · 0.45

Tested by

no test coverage detected