Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Oh, so you are looking for a real compiler. I do not think that it is possible to compile Python, since the language is just too dynamic.

You'd have to compile every function for every possible combination of types, since the types of the function arguments can not be known at compile time without solving the halting problem. Even worse, new types could be created at runtime.

You can either type everything (like Cython, which arguably is not really Python anymore) or include a compiler to compile types that were not known at compile time, but that is just a JIT compiler with extra steps.

 help



But Python compilers exist, nuitka being a more famous one: https://en.wikipedia.org/wiki/Nuitka

Nutika uses CPython as fallback. From the Limitations section:

    > Standalone binaries built using the --standalone command line option include an embedded CPython interpreter to handle aspects of the language that are not determined when the program is compiled and must be interpreted at runtime, such as duck typing, exception handling, and dynamic code execution (the eval function and exec function or statement), along with those Python and native libraries that are needed for execution, leading to rather large file sizes.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: