[Python-Dev] PEP 399: Pure Python/C Accelerator Module Compatibiilty Requirements (original) (raw)

Stefan Behnel stefan_ml at behnel.de
Mon Apr 18 23:11:02 CEST 2011


R. David Murray, 18.04.2011 14:30:

On Mon, 18 Apr 2011 09:36:20 +0100, Paul Moore wrote:

On 18 April 2011 08:05, Maciej Fijalkowski wrote:

On Sun, Apr 17, 2011 at 4:19 AM, Raymond Hettinger wrote:

The PEP seems to be predicated on a notion that anything written in C is bad and that all testing is good. Sounds about right I disagree. To me, a Python without libraries such as os, zlib, zipfile, threading, etc wouldn't be much use (except in specialised circumstances). OK, that means that alternative implementations need to do extra work to implement equivalents in their own low-level language, but so be it (sorry!) I think Maciej left out an "only" in that sentence. If you say "only C", then the sentence makes sense, even when applied to modules that can only be written in C (for CPython). That is, not having a Python version is bad. Necessary in many cases (or not worth the cost, for external library wrappers), but wouldn't it be nicer if it wasn't necessary?

FWIW, there is a proposed GSoC project that aims to implement a Cython backend for PyPy, either using ctypes or PyPy's own FFI. That would basically remove the need to write library wrappers in C for both CPython and PyPy, and eventually for IronPython, which also has a Cython port in the making. Not sure how Jython fits into this, but I wouldn't object to someone writing a JNI backend either.

Stefan



More information about the Python-Dev mailing list