Why is it impossible to create a compiler than can compile Python to machinecode like C?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Feb 28 22:47:34 EST 2013


On Thu, 28 Feb 2013 22:03:09 +0100, Stefan Behnel wrote:

> The most widely used static Python compiler is Cython

Cython is not a Python compiler. Cython code will not run in a vanilla 
Python implementation. It has different keywords and syntax, e.g.:

cdef inline int func(double num):
    ...


which gives SyntaxError in a Python compiler.

Cython is an excellent language and a great addition to the Python 
ecosystem, but it is incorrect to call it "Python".


-- 
Steven



More information about the Python-list mailing list