<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 9 August 2013 08:07, Volker Braun <span dir="ltr"><<a href="mailto:vbraun.name@gmail.com" target="_blank">vbraun.name@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2hv" style="overflow:hidden">Now if there are unbalanced brackets ("QQ[}") then we would like to tell the<br>


user that, but right now any exceptions raised by the input transformer will<br>
not be caught and terminate IPython. I think it would be easy to patch<br>
IPython to catch SyntaxErrors from the input transformers, but then I was<br>
hoping that the developers would have already made some sort of plan for how<br>
to notify the user of syntax errors. Or maybe it is not desirable for some<br>
reason?</div></blockquote></div><br></div><div class="gmail_extra">I don't think we really thought about it. For IPython, our extra syntax is limited enough that if something's invalid, we just want a standard Python SyntaxError.<br>

<br></div><div class="gmail_extra">I'm don't object to adding the ability to raise exceptions, if it can be done neatly without impacting our use cases. But I also partly feel that if Sage is extending the syntax that much, it should probably be thinking about writing a proper parser. Our input transformation machinery is really intended to support some extensions to Python syntax, not the definition of a whole Python-like programming language.<br>

<br></div><div class="gmail_extra">Thanks,<br>Thomas<br></div></div>