|
|
Subscribe / Log in / New account

Watson: Launchpad now runs on Python 3

Watson: Launchpad now runs on Python 3

Posted Aug 3, 2021 22:42 UTC (Tue) by NYKevin (subscriber, #129325)
In reply to: Watson: Launchpad now runs on Python 3 by rschroev
Parent article: Watson: Launchpad now runs on Python 3

> But Python is not CPython ... in theory. When people speak about Python, they almost always refer to CPython. www.python.org is all about CPython. There are other implementations, but they are hopelessly outdated, or are not complete, or have poor support for external libraries. PyPy is the exception: only slightly behind CPython, mostly compatible. None of those compile Python to machine code (some of the implementations use a JIT compiler, which is not the same thing). In practice, Python is almost always CPython and other implementations don't (yet?) bring all that much difference to the table conceptually.

Well, there's also Cython, which can transpile nearly any Python into C. But it has its own drawbacks, since what it really "wants to" do is let you write code in a mixture of Python and Python-with-C-type-annotations, and selectively speed up the latter on a line-by-line basis. If you try to read the C that it produces, you will find that it's almost completely impenetrable (each line of pure Python translates into 4-5 lines of calls to the C/Python API, error handling, dispatch, etc., and the whole thing also has a huge wall of #defines and other preprocessor garbage). So in practice, it's more like compiling to machine code, but in two steps.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds