[capi-sig] Problem with reference

Stefan Behnel python_capi at behnel.de
Tue Mar 3 15:54:19 CET 2009

M.-A. Lemburg wrote:
> On 2009-03-03 12:14, Stefan Behnel wrote:
>> Cython is not a wrapper generator. It's a programming language that sits
>> right between Python and C and generates code for the C-API of Python.
> I think that's where the misunderstanding lies: This list is about the
> Python C-API and not about generators or other helpers that provide
> ways of avoiding it :-)
> http://www.python.org/community/sigs/current/capi-sig/
> IMHO, the list is about:
>  * discussing ways of improving the Python C API

Fine with me, happy to contribute, but a rare thing.

>  * helping developers that have questions about the Python C API

Most developers who ask on this list do so because they have problems with
the C-API and its concepts, with reference counting or because they fail
to understand why the code they have written does not do what they want it
to do. This is the right list to ask these things, and I'm all for helping
them out.

> Suggesting to use Cython or any of the other available tools feels
> a bit like saying "avoid the Python C API wherever you can", which
> doesn't give the right impression to developers seeking help from
> this forum.

I'm not saying "avoid the C-API wherever you can", because it is not the
goal to avoid the C-API. The goal is to get your code working, to keep it
maintainable, and to make it fast (in more or less that order). Plus, once
you have achieved to build your "first Python extension", you are totally
on your own when it comes to supporting different Python versions and C
compilers. For example, migrating code from Py2.4 to Py2.5 wasn't trivial,
but making it work on both Py2.x and Py3 is actually really hard, been
there, done that. There is no win in pushing new developers into all that.
That is what the Cython project is all about.


More information about the capi-sig mailing list