[IPython-dev] messaging protocol

Thomas Kluyver takowl at gmail.com
Fri Apr 8 16:21:11 EDT 2011


On 8 April 2011 19:19, Brian Granger <ellisonbg at gmail.com> wrote:

> But hold on a second.  I thought that we had made the decision that
> display hook was never to be triggered twice for a given input cell.
> Has that changed?  A few weeks ago, the code had regressed into the
> multiple display hook being called state, but I thought that was a bug
> we were going to fix.
>
> Brian
>

I think we worked out that what had actually been written was code to ensure
that only one block per cell (the last one) was able to produce output. But
if that block was, say "for a in range(5): a", it could still produce
multiple outputs. As far as I know, we've never prevented that.

In fact, now that we're using AST instead of code blocks, we could actually
do what you suggest. We could check the last node, and only run it
interactively if it was a single expression. Whether or not that's what we
want to do, I don't know: any views?

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20110408/207efac4/attachment.html>


More information about the IPython-dev mailing list