[Cython] Python array support (#113)

Robert Bradshaw robertwb at gmail.com
Sun May 6 09:16:03 CEST 2012

On Sat, May 5, 2012 at 10:42 PM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> Stefan Behnel, 05.05.2012 21:50:
>>>   https://github.com/cython/cython/pull/113
>> This looks ok to me now. There have been objections back when we discussed
>> the initial patch for array.array support, so what do you think about
>> merging this in?
> One think I'm not sure about is how to deal with the header file. It would
> be nice to not rely on an external dependency that users need to ship with
> their code. Moving this into our utility code to write it into the C file
> would remove that need, but we don't currently have a way to trigger
> utility code insertion from .pxd files explicitly. Should we special case
> "cimport cpython.array" for this?

That's my biggest concern as well (though I only quickly skimmed
through the code). I would be OK with special casing this Python

> Oh, and maybe we should also provide a fused type for the supported array
> item types to make it easier for users to write generic array code?
> (Although the mass of types may be overkill for most users...)

I think it's easy enough for the end user to make a fused type of the
specializations they care about.

- Robert

More information about the cython-devel mailing list