[IPython-dev] splitter not transforming a line

Thomas Kluyver takowl at gmail.com
Tue Sep 25 09:01:51 EDT 2012


On 25 September 2012 13:43, Jason Grout <jason-sage at creativetrax.com> wrote:
> Do you think the AST hook will make it into the next version, or should
> I submit a quick fix for this issue (i.e., check to see if buf[-1]
> starts with '@' as well as ends with ':' or ',').

It should make it into 0.14, but if the 'next version' you're thinking
of is 0.13.1, I don't think it will be backported - it is a new
feature, after all.

> We'll still have to do a string transformation since we introduce new
> syntax as well (e.g., [1..4] means [1,2,3,4]).  But many of our
> transforms will work more cleanly on an AST, so thanks for your work on
> this!

Yep, AST transformations are only possible if the syntax is already
valid Python, so the revised input transformation system will
definitely support string transformations. But where it's possible, an
AST transformation should be easier to write and more reliable.

Thomas



More information about the IPython-dev mailing list