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

Method __call__

IPython/core/formatters.py:970–985  ·  view source on GitHub ↗

Compute the format for an object.

(self, obj)

Source from the content-addressed store, hash-verified

968
969 @catch_format_error
970 def __call__(self, obj):
971 """Compute the format for an object."""
972 if self.enabled:
973 # lookup registered printer
974 try:
975 printer = self.lookup(obj)
976 except KeyError:
977 pass
978 else:
979 printer(obj)
980 return True
981 # Finally look for special method names
982 method = get_real_method(obj, self.print_method)
983 if method is not None:
984 method()
985 return True
986
987
988class MimeBundleFormatter(BaseFormatter):

Callers

nothing calls this directly

Calls 2

get_real_methodFunction · 0.85
lookupMethod · 0.80

Tested by

no test coverage detected