Hi,

Greg Ewing wrote:
> Stefan Behnel wrote:
>> This would normally call for two special functions __getbuffer__ and
>> __releasebuffer__. To me, however, this looks like an extremely C-ish
>> interface that does not fit Cython at all.
> 
> That's because it's designed for use by C code, not by
> Python code. Trying to make it more "Python-like" would
> defeat the purpose of having it in the first place.

That sounds a bit like you are objecting to my proposal. What would you see as
a better solution then?

I mean, we will have to support the buffer interface in one way or another,
and we will have to do it in a way that works on Py3 and compiles on Py2.

Cython is all about writing C code without writing C code, so I would really
prefer a solution that does not require going all the way down to C-ish code,
just to implement a Python object protocol.

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

Reply via email to