[Apologies, meant to post this to list. Thanks, Robert, for pointing it out]<br><br><div class="gmail_quote">On 14 March 2011 16:53, Thomas Kluyver <span dir="ltr"><<a href="mailto:takowl@gmail.com">takowl@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="gmail_quote"><div class="im">On 14 March 2011 16:39, Robert Kern <span dir="ltr"><<a href="mailto:robert.kern@gmail.com" target="_blank">robert.kern@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>I really don't think we want the Out[] variable to have lists of things. That's<br>
really annoying for the most common case and would break long-standing usage.<br>
Having multiple displayhook calls is almost always an accident (e.g. usually you<br>
make a function call for its side effects even if it returns something not<br>
None), not an intentional act. I think the current behavior is perfectly fine:<br></div></blockquote></div><div><br>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.<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>
That said, for the recording of displayhook outputs in *history*, we may as well<br>
record all of the the things sent to the displayhook. In the SQLite history, you<br>
can do this by just using a dummy autoincrementing primary key for the table and<br>
letting the (session, line) columns be non-unique.</div></blockquote></div></div><br>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.<br>
<font color="#888888">
<br>Thomas<br>
</font></blockquote></div><br>