More Python fragmentation
Posted Mar 18, 2012 14:54 UTC (Sun) by
Tobu (subscriber, #24111)
In reply to:
More Python fragmentation by man_ls
Parent article:
Van Rossum: Python is not too slow (InfoWorld)
PyPy isn't a Python subset, it is a compatible alternative implementation of the same language. One PyPy developer did work on the faster but restricted approach (Armin Rigo on Psyco) before getting involved in PyPy. Of the incompatibilities between CPython and PyPy, the one that matters in practice is the absence of refcounting.
Python 3 compatibility is being worked on. So is compatibility with the C api, which has been reworked to be less abstraction-leaky in Python 3. When C is used to accelerate bottlenecks, a pure-python fallback for PyPy can perform faster than the C version. People are also working on implementing enough C-api compatibility that Cython-generated bindings work out of the box; this is competing with another approach that makes Cython generate pure python + ctypes bindings. Some parts of the ecosystem are harder to crack, especially scientific Python, but that is being worked on by rewriting the numpy core.
As far as compatibility being a maintenance burden: I tend to write Python 2 code, which is compatible with CPython2 and PyPy, and let distribute invoke 2to3 to convert my packages when installed in a CPython3 environment. Running a testsuite across multiple implementations and versions of Python is very simple using a tool called tox.
(
Log in to post comments)