On 6/13/07, Sylvain Thénault <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > On 6/7/07, Nicolas Chauvat <[EMAIL PROTECTED]> wrote: > > On Wed, Jun 06, 2007 at 12:08:00PM -0700, Stani wrote: > > > > > It is indeed, but is implemented in C, which means an extra dependency > > > and not a 100% python solution. Normally modules (especially in the > > > pythonpath) which you import don't have syntax errors. Maybe logilabs > > > implementation handles syntax errors well as it is developed for > > > PyLint. Nicolas? > > > > Please let me involve Sylvain in the discussion. As the main author of > > pylint and astng, he will provide better answers. > > well logilab-astng is basically a big monkey patching of the compiler > package from the stdlib, so you can't get an astng representation from a > module with syntax errors in. However inference and most others > navigation methods (which are basically the value added by astng) are > "syntax error resilient" : if a dependency module (direct or indirect) > contains a syntax error, you don't get any exception, though since some > information is missing you can miss some results you'ld get if the > faulting module were parseable. > > does that help ? > > -- > Sylvain >
That certainly sounds helpful! Since astng already does some inference (which we definitely want!) and is based on the standard Python AST compiler, it sounds like our #1 candidate. I think we should give the code a serious once-over and see how well it fits our requirements, and if it can be adapted to better handle errors. Any volunteers? Also, has anyone used astng for completion, calltips, or something similar? Or the standard AST compiler, for that matter? - Tal
