[IPython-dev] Multiple outputs per input line
Mon Mar 14 12:04:34 CDT 2011
[Apologies, meant to post this to list. Thanks, Robert, for pointing it out]
On 14 March 2011 16:53, Thomas Kluyver <firstname.lastname@example.org> wrote:
> On 14 March 2011 16:39, Robert Kern <email@example.com> wrote:
>> I really don't think we want the Out variable to have lists of things.
>> really annoying for the most common case and would break long-standing
>> Having multiple displayhook calls is almost always an accident (e.g.
>> usually you
>> make a function call for its side effects even if it returns something not
>> None), not an intentional act. I think the current behavior is perfectly
> At present, the Out variable in the user namespace is the same object as
> the stored output history from the current session. I think the best way is
> if I separate these.
>> That said, for the recording of displayhook outputs in *history*, we may
>> as well
>> record all of the the things sent to the displayhook. In the SQLite
>> history, you
>> can do this by just using a dummy autoincrementing primary key for the
>> table and
>> letting the (session, line) columns be non-unique.
> I tried this, but it would need additional logic in Python to display the
> inputs and outputs in the right sequence. I prefer the system I've written,
> where (session, line) is unique, and the outputs for each command are
> serialised as JSON. Inputs and outputs are conveniently paired by SQL JOIN,
> and it's trivial to display them correctly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev