[IPython-dev] Frontendbase and compile_ast.

Gael Varoquaux gael.varoquaux@normalesup....
Sun Sep 14 17:11:55 CDT 2008


On Sun, Sep 14, 2008 at 11:39:25PM +0200, Gael Varoquaux wrote:
> Currently no code in the frontends uses this method. I used it for a
> while, but it turned out that the codeop module was more suited for
> testing if the code was complete than compiling it to ast. I am strongly
> thinking about removing this method for know.

OK, I went ahead and replaced the is_complete method to avoid using the
compile_ast one. I stuck with the original behavior of not raise an
exception when the code was not valid, but I think it would be a better
behavior, as it allows to give feedback to the user on incorrect code.
This is what I do in the linefrontendbase is_complete's method.

Barry, what are your thoughts on that? You can take a peek at the new
version of is_complete in my branch.

Gaël


More information about the IPython-dev mailing list