[IPython-User] iPython notebook and statements that span multiple lines

Thomas Kluyver takowl@gmail....
Mon Nov 12 05:35:53 CST 2012


On 12 November 2012 11:09, Will Furnass <will@thearete.co.uk> wrote:

> Ah, thanks.  Would it not make more sense for the line-level magic
> functions to continue parsing lines until all parentheses have been
> matched i.e. only operate on one or more complete statements?
>

Yes and no. Most magic functions aren't Python code, so it wouldn't make
sense to handle them as Python syntax.

There's a patch in the works that will let you spread a line magic over
several lines [1], but it will use explicit continuations with a backslash,
rather than guessing when the command is complete.

[1] https://github.com/ipython/ipython/pull/2447

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20121112/b29c1c5b/attachment-0001.html 


More information about the IPython-User mailing list