Python Type-Inference based LINT.. (pylint.py)

David Jeske jeske at egroups.net
Mon Nov 22 03:00:43 CET 1999


Hello,

I'm interested to know who out there is interested in working on a
type-inference based static type checker (i.e. LINT) for Python. I've
read various snippits about static type extensions, and the intent to
put type-inference into Viperi. However, I've not seen much more talk
of either of these.

I've been thinking that even with syntax extensions like the
"Add-Later Static Types" proposal, type-inference would be required to
get any valuable static type-checking out of the majority of (untyped)
Python code. Furthermore, a Type-Inference based static-lint should
allow some static type safety for those who want it, without impacting
any the existing Python environment for those who don't want it.

Scott Hassan and I have started a simple type-inference graph
generator based on the parser module's Abstract Syntax Trees. It is
able to parse basic test files and produce some simple type-inference
graphs. We could use some help from someone more familiar with
both ASTs and the Python Interpreter Internals.

You can download what we have so far by by going to:

http://www.chat.net/~jeske/Projects/PyLint/download/

The source file includes our theory of operation, implementation
documentation, and of course, the code. :)

-- 
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + jeske at egroups.net
                    eGroups Core Server Engineering




More information about the Python-list mailing list