bundles / IPython 9.11.0 / IPython / core / formatters / IPythonDisplayFormatter
MetaHasTraits
IPython.core.formatters:IPythonDisplayFormatter
source: /IPython/core/formatters.py :947
Signature
def IPythonDisplayFormatter ( ** kwargs : t.Any ) → None Members
Summary
An escape-hatch Formatter for objects that know how to display themselves.
Extended Summary
To define the callables that compute the representation of your objects, define a _ipython_display_ method or use the for_type or for_type_by_name methods to register functions that handle this. Unlike mime-type displays, this method should not return anything, instead calling any appropriate display methods itself.
This display formatter has highest priority. If it fires, no other display formatter will be called.
Prior to IPython 6.1, _ipython_display_ was the only way to display custom mime-types without registering a new Formatter.
IPython 6.1 introduces _repr_mimebundle_ for displaying custom mime-types, so _ipython_display_ should only be used for objects that require unusual display patterns, such as multiple display calls.
Aliases
-
IPython.core.formatters.IPythonDisplayFormatter