Python questions -> compiler and datatypes etc

Paul Rubin phr-n2001d at
Thu Oct 11 02:26:16 CEST 2001

Richard Jones <richard at> writes:
> Do a search in the python mailing list for "python compiler". The
> answer is invariably "it's bloody hard". This stems from the
> fundamental dynamic typing of python. It's very very very hard to
> write a compiler when you don't know the type of the objects you're
> dealing with beforehand. Java knows these types, because it's
> statically typed. Therefore it's relatively trivial (compared to
> python) to write a compiler for Java.

I think the real answer to why there's no Python compiler is no one
has really wanted to write one.  Python's runtime semantics are pretty
similar to Lisp systems, and native-code Lisp compilers have existed
since the 1960's or maybe even earlier.  It might even be feasible
to adapt one to compile Python.

More information about the Python-list mailing list