If you write a custom _repr_html_, you are likely to assemble subparts by recursively calling _repr_html_ on sub-elements (thanks to open recursion).
If you have an object B which inherits from A, you can specialize on B, or use the existing method for A.
However, you cannot specializes the "html" part with inheritance.
Say for example that you want to define a slightly different _repr_html_ method depending on the context (maybe you target the subset of HTML that works correctly in emails) or if you want to render "latex" with custom "tikz" macros instead of using matplotlib.
With multiple dispatch, you can specialize on the target too, which means you can specialize wherever required or fall back to a generic behavior if not.
However, you cannot specializes the "html" part with inheritance. Say for example that you want to define a slightly different _repr_html_ method depending on the context (maybe you target the subset of HTML that works correctly in emails) or if you want to render "latex" with custom "tikz" macros instead of using matplotlib.
With multiple dispatch, you can specialize on the target too, which means you can specialize wherever required or fall back to a generic behavior if not.