[Cython] Rewriting/compiling parts of CPython's stdlib in Cython
sturla at molden.no
Mon Mar 28 00:39:02 CEST 2011
Den 25.03.2011 19:03, skrev Robert Bradshaw:
>>> Looking at Guido's comment, Cython must be able to compile all valid
>>> Python if this will have any chance of success.
> Good thing that's our goal (pending an actual definition of "all valid Python.")
In lack of a Python language specification it can be hard to tell
implementation details from syntax. It sounded though as if Guido was
worried about Cython's compatibility with Python, and maybe the Cython
dev team's attitude to Python compatibility.
Also don't think Cython's main strength in this context was properly
clarified in the debate. It is easy to over-focus on "speed", when it's
really a matter of "writing Python C extensions easily" -- i.e. without
knowing (a lot) about Python's C API, not having to worry about
reference counting, and the possibility of using Python code as
prototype. Cython is, without comparison, the easiest way of writing C
extensions for Python. FWIW, it's easier to use Cython than ctypes.
Using Cython instead of the C API will also avoid many programming
errors, because a compiler does fewer mistakes than a human. Those
aspects are important to communicate, not just "Cython can be as fast as
More information about the cython-devel