MimeBundleFormatter.__call__ should not return None. #10650

Open
Carreau opened this Issue Jun 9, 2017 · 1 comment

Comments

Projects
None yet
1 participant
Owner

Carreau commented Jun 9, 2017

__call__ seem to be expected to always return a tuple in IPython.core.display:display

Moreover the formatter take precedence over the user registered formatter, while the _repr_*_ do not.

I believe this is wrong, as user registered formatter should take precedence.
An option for user register formatter to not take precedence (and opt-in) would make sens for things like ipython/disp.

Owner

Carreau commented Jun 9, 2017

Also, maybe we should return a namedtuple DataMetadata = namedtuple('DataMetadata', ['data', 'metadata']) for convenience in some place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment