On Tue, Feb 16, 2010 at 8:04 AM, Emile Anclin <emile.anc...@logilab.fr> wrote:
> I started refactoring astng this summer; > first I reduced the monkey patching (september 2009). > I am since november working on a branch called 'rebuild' which indeed > creates our own nodes so that monkey patching should eventually > disappear. Interesting. That seems like a fruitful way. > By the way, I absolutely agree with you that the inference code is > difficult to understand. It's doing a difficult job. Generators are often an elegant way to get things done, but perhaps another way would be clearer. It's certainly an open question as far as I am concerned. > I am not sure, but I would imagine a mechanism > that controls the inference by a class (probably something similar to a > Visitor) that could catch infinite recursion and the like. > Maybe you are right regarding to the exception mechanism that it is not the > best way to handle it. I would also like to work without generators / > yield; for me it would be much clearer if the inferred values would be > collected in our Visitor / Walker, but I might be quite wrong about that. I am not really sure whether exceptions are really the problem. It was just a first thought. It can be discarded easily if I am wrong. > Also, I am very interested about your ideas: > > Pass 4: post-process pylint nodes > > and : > > Pass 5: dynamic analysis > > This is the fun/hard part. We want to infer the types that variables > can have, and the types that functions (and classes with __call__ > members) can have. Analyzing assignment statements is the big one. All right then. It sounds like we have made a good start. I'm glad you and Sylvain are open to ideas, even from somebody like me who as yet knows little about the details. Very glad to meet you, Emile. Edward _______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects