[Python-Dev] Using Cython for standard library?

Gerhard Häring gh at ghaering.de
Mon Nov 3 12:29:36 CET 2008


Stefan Behnel wrote:
> Michael Foord wrote:
>> Moving more C extensions to an implementation based on ctypes would be
>> enormously useful for PyPy, IronPython and Jython, but ctypes is not yet
>> as portable as Python itself which could be an issue (although one worth
>> resolving).
> 
> In the same line, moving more extensions to a high-level language like Cython,
> instead of writing them in straight C, would make a later switch to a
> different environment a lot easier, as the extensions could be regenerated
> with a modified Cython compiler (obviously minus some fixing of premature
> optimisations and the like).

Is using Cython for anything in Modules/ really an option? In my limited 
experiments with it, I did like it.

But using it for Python standard library stuff doesn't look quite right 
to me:

- Option 1: distribute Cython with Python and integrate into build process
-- Ouch!

- Option 2: only distribute generated source files
-- developers still need to have Cython installed
-- you have to trust Cython; who will really review the generated code?

-- Gerhard


More information about the Python-Dev mailing list