Isn't that pretty much what pypy does (from my limited experience with it). They seem to infer types in places where they're invariable. The whole idea of rpython subset of language seems to make this possible.<p>There were also other projects doing that. This post offered an interesting thesis, but the pdf is not online anymore <a href="http://groups.google.com/group/comp.lang.python/msg/114a25d394769591" rel="nofollow">http://groups.google.com/group/comp.lang.python/msg/114a25d3...</a> maybe someone knows of a copy?