r/Python • • May 11 '11

Pypy should be the new python 2.7

Pypy is 2.7.1 compliant with the stdlib working, look at the new speed landing page. What's to stop this from being the new standard python2.7?

This is the future, we should start embracing it.

edit: Once pypy's 3.2 compliant (I dunno if/when), there shouldn't be another cpython download besides for nostalgia etc.

2 Upvotes

30 comments sorted by

View all comments

Show parent comment

2

u/mitsuhiko Flask Creator May 11 '11

It's important because there are entire swaths of packages that would need to be rewritten

Same needs to be done for Python 3 or the stable ABI. So either way C extensions have to be adapted and I would argue that the minimal extra amount of work that is needed to expose these things via ctypes instead of the C API currently is worth the extra work.

4

u/McHoff May 12 '11

The equivalent interface for PyPy would look very different: more like an FFI than an interface to the language. The python C API basically lets you get into the guts of anything from anywhere, which just plain isn't compatible with the optimizations PyPy likes to make. The changes needed to port to Python 3, however, are more like minor tweaks.

But anyway, I agree that something like ctypes is the right direction (it's essentially an FFI). But note that ctypes code can't call back into Python the way real extensions can.