On 6/6/07, Josiah Carlson <[EMAIL PROTECTED]> wrote: > For reference, PyPE auto-parses source code in the background, generating > (among other things) a function/class/method hierarchy. Its autocomplete > generally sticks to global functions and keywords, but when doing > self.method lookups, it checks the current source code line, looks up in its > index of classes/methods, and trims the results based on known methods in > the current class in the current source file. > > It certainly isn't complete (it should try to check base classes of the > class in the same file, it could certainly pay attention to names assigned > in the current scope, the global scope, imports, types of objects as per > WingIDE's assert isinstance(obj, type), etc.), but it also makes the > computation fairly straightforward, fast, and only in reference to the > current document.
How does PyPE parse code? Home-rolled, standard AST compiler, something else? It seems to me we should try to come up with an algorithm for parsing, before getting to the code. All of the details you mentioned - noticing assignments, using base-class methods, etc. - could be better defined and organized this way. Perhaps we could brainstorm on this in a wiki? - Tal
