Porting the 2-3 heap data-structure library from C to Python

Terry Reedy tjreedy at udel.edu
Sun Mar 11 03:17:06 CET 2012

On 3/10/2012 8:03 PM, Hrvoje Niksic wrote:
> Stefan Behnel<stefan_ml at behnel.de>  writes:
>>> which is the standard way of extending Python with high-performance
>>> (and/or system-specific) C code.
>> Well, it's *one* way.  Certainly not the easiest way, neither the most
>> portable and you'll have a hard time making it the fastest.
> I didn't say it was easy, but standard, in the sense of documented in
> Python documentation.  Python/C is as portable as Python itself, and as

Python is portable because a *lot* of work has gone and continues to go 
into making it so. And because it sticks with the lowest common 
denominator of C89. There is much system or compiler specific code in 
#ifdefs. There are over 60 buildbots for testing patches on various 
hardware-os-compiler-(python)version combinations. Perhaps once a week 
something does not work on one of them. The patch gets revised. It 
happened just today.

Apple is changing compilers for the Mac; Python initially did not build 
with the new compiler. Some people had to do some work so there would 
continue to be Python on the Mac. So I can imagine that Cython *might* 
shield one from some of the very real portability problems.

> fast as the platform allows.  I understand your desire to promote
> Cython, but please stop resorting to FUD in doing so.

You admitted it might be easier. Portability is plausible. So I think 
that a bit harsh.

Terry Jan Reedy

More information about the Python-list mailing list