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

Method __call__

IPython/core/formatters.py:904–919  ·  view source on GitHub ↗

Compute the format for an object.

(self, obj)

Source from the content-addressed store, hash-verified

902
903 @catch_format_error
904 def __call__(self, obj):
905 """Compute the format for an object."""
906 if self.enabled:
907 # lookup registered printer
908 try:
909 printer = self.lookup(obj)
910 except KeyError:
911 pass
912 else:
913 printer(obj)
914 return True
915 # Finally look for special method names
916 method = get_real_method(obj, self.print_method)
917 if method is not None:
918 method()
919 return True
920
921
922class MimeBundleFormatter(BaseFormatter):

Callers

nothing calls this directly

Calls 2

get_real_methodFunction · 0.85
lookupMethod · 0.80

Tested by

no test coverage detected