[IPython-dev] magics and metadata

Brian Granger ellisonbg at gmail.com
Tue Jun 19 18:18:03 EDT 2012

On Tue, Jun 19, 2012 at 2:59 PM, Fernando Perez <fperez.net at gmail.com> wrote:
> On Tue, Jun 19, 2012 at 1:17 PM, MinRK <benjaminrk at gmail.com> wrote:
>> Yes - we put metadata on outputs for a reason, presumably.  If this
>> shouldn't be saved, it should probably be removed from the API.
> I can't recall precisely what we had in mind when we put it in, but
> something that springs to mind as potentially useful, for example,
> would be to specify a desired priority order for the various types of
> outputs. Right now when a client can display several kinds of output
> it just makes a choice, but we could let objects provide a hint of the
> preferred order, based on what they know about the relative quality of
> each.

I originally put it there to allow objects to provide hints to the
frontend on how it should display a representation.  This is similar
to how the payloads can indicate where it came from.

> So I'd vote for not removing this, as it may prove useful...

I also think it could be useful, although it seems a bit excessive to
store metadata for each output.  Here is what I propose.  We simply
leave it alone until we have an actual use case that will help us
figure out exactly what this should look like.  Without a concrete
usage case, it is difficult to know what is needed.

> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu and ellisonbg at gmail.com

More information about the IPython-dev mailing list