Dag Sverre Seljebotn wrote:
> As for Python 2.6, it appears that we have the option to generate
> objects using the new buffer slots, but we can also generate objects
> without. Thoughts?
>
> Mine: At least as long as NumPy doesn't implement this for 2.6, I'd like
> to stay with emulation. If I get the time then perhaps a "dual-mode"
> where the slots are checked first, and if the object doesn't have the
> slots (i.e. the flags of the type is set to not supporting the new
> buffers) then emulation is used.

If I understand correctly, you only refer to /getting/ the buffer of a
however implemented object, not about implementing the __getbuffer__()
method, right? So Cython implemented buffer objects would have their
__getbuffer__() in any case?

I don't see why we shouldn't support getting the buffer of /any/ object
that support the buffer protocol, be it in 2.6 or 3.0, instead of just
special casing NumPy. I do agree, however, that this is not a short-term
requirement. I think a dual-mode of NumPy special casing and generic
buffer support would be the best solution. The code for both is there
anyway, right?

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to