[Python-Dev] Cython as a Python implementation

Stefan Behnel stefan_ml at behnel.de
Thu Nov 5 17:08:52 CET 2009


Antoine Pitrou, 05.11.2009 14:02:
> Thomas Heller writes:
>>> Why do you want to be recognized as a Python implementation, anyway? I
>>> don't really understand why this seems so important to you.
>>
>> Advertising, I assume.  That's what Stefan often does (at least it feels
>> this way, for me).
>
> Well, it's true that their work often goes unnoticed in favour of more
> pie-in-the-sky things such as PyPy and unladen-swallow.

That's likely got to do with it. It's not the first time I read about the
"four" Python implementations. It may be related to the lack of Cython
developers at the language summits, but, well, it's not like those were
cheap to join either, if you count travel time/costs etc.

I'm well aware, and I openly admit that Cython is laging behind in terms of
Python language features when compared with other Python implementations. A
reason for this is that the goal of the Cython project to design a
/superset/ of the Python language is simply more ambitious (and certainly
more time consuming) than just writing "yet another Python implementation".
We put a lot of thought work into language design between Python and C, and
also into code performance optimisations, where others can just go straight
for CPython compatibility. But this doesn't mean we are not writing a
Python implementation. It just means that we do more than that, and that
this 'more' takes time.

It has often been argued that it's easy to implement Python faster if you
actually don't implement Python, but that doesn't apply to the current
Cython anymore. What it lacks in terms of features is nothing that would
impact the performance of existing features in any way.

Like most of the other Python implementations, Cython is ready to use now.
Unlike most others, it has all batteries included. And unlike some others,
it's fast and even scales extremely well with various performance
requirements. Personally, I consider Cython one of the killer arguments
against performance prejudices about the CPython platform, if not about the
Python language itself.

Stefan



More information about the Python-Dev mailing list