[capi-sig] Some type inference for python?

Stefan Behnel stefan_ml at behnel.de
Tue May 25 10:24:11 CEST 2010

Issyk Kol, 21.05.2010 19:47:
> I'd like to do some ML-like type inference for Python code. I'm not
> trying to resurrect the static typing vs. dynamic typing debate here.
> It's simply that I'd need to get static typing for Python for
> code-generation reasons.

I think your best bet is to look at an alternative implementation of 
Python, such as PyPy, Jython, IronPython or Cython. CPython doesn't do any 
type inference, but at least PyPy and Cython infer types to a certain 
extent, and I would expect the others to do it, too.

There's also ShedSkin which is supposed to have a pretty good type inferer 
for (static) Python-like code. Might be enough for your purpose.

In any case, the C-API won't help you here, so this is the wrong forum to 
discuss this.


More information about the capi-sig mailing list