On May 26, 2010, at 6:40 AM, Sebastian Walter wrote:
On Wed, May 26, 2010 at 12:31 PM, Pauli Virtanen
wrote: Wed, 26 May 2010 10:50:19 +0200, Sebastian Walter wrote:
I'm a potential user of the C-API and therefore I'm very interested in the outcome. In the previous discussion (http://comments.gmane.org/gmane.comp.python.numeric.general/ 37409) many different views on what the new C-API "should" be were expressed.
I believe the aim of the refactor is to *not* change the C-API at all, but separate it internally from the routines that do the heavy lifting. Externally, Numpy would still look the same, but be more easy to maintain.
Sorry for the confusion. By C-API I meant a C-API that would be independent of the CPython API.
The routines that do the heavy lifting could then be good for reuse and be more easy to maintain, but I think how and where they would be exposed hasn't been discussed so far...
I had the impression that the goal is not only to have code that is easier to maintain but to give developers the possibility to use numpy functionality (broadcasting, ufuncs, ...) within C code without having to use CPython API (refcounts, construction of PyObjects etc.).
This is partially correct. There may be a need to have some "stub" implementation of some aspects of the Python C-API (probably at least reference counting and exception handling for now). We don't need to work all of this out initially. I think getting the separation done in the next several weeks will spawn conversations and ideas that may take several months to work out the new C-level-only API. That "interface" API is important in the short term, but also one that could change over the next several months. -Travis