[Python-Dev] Using Cython for standard library?

Stefan Behnel stefan_ml at behnel.de
Tue Nov 4 20:17:41 CET 2008

skip at pobox.com wrote:
>     >>> - 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?
>     >> 
>     >> Who reviews the machine code from gcc?
>     Gerhard> That's comparing apples and eggs :-P But it may be that I'm a
>     Gerhard> little paranoid here.
> Agreed.  When Cython is as widely used as gcc and has as comprehensive a set
> of test cases (who knows? it may well already be comprehensive enough)

The test suite is pretty huge already, works on Py2.3 through Py3.0 (without
regenerating the C source code, BTW), and it tests C compilation as well as
C++ compilation of the generated source code.

> and supports all the compilers which Python supports

I didn't hear any complains so far. Portable C code is definitely a project goal.

> then we can probably skip the output code review step.

I think the main advantage for stdlib modules is actually the maintenance
cost. Having a single, easy-to-read code base for extension modules that
compiles without modification in Py2.6/7 and Py3.0/3.1 (and 2.3, 2.4 and 2.5),
makes life a lot easier for both maintainers and backporters.


More information about the Python-Dev mailing list