[Python-3000] Using memoryviews

Benjamin Peterson musiccomposition at gmail.com
Fri Nov 21 22:34:29 CET 2008


On Fri, Nov 21, 2008 at 1:41 PM, M.-A. Lemburg <mal at egenix.com> wrote:
>
> In the past, we've always tried to provide abstract access methods to
> C struct internals of Python objects and I wonder whether this was
> deliberately not done for Py_buffer structs or simply not considered.
>
> I don't think it's a good idea to use my_Py_buffer->buf in a C
> extension and would rather like to write:
>
> Py_Buffer_AS_BUFFER(my_Py_buffer)
> Py_Buffer_GET_SIZE(my_Py_buffer)
> Py_Buffer_GET_ITEM_SIZE(my_Py_buffer)
> etc.

I think that's a good idea, too, and we should get something like that
in for 3.1. I rather feel like the new buffer API slipped in without
any real review.



-- 
Cheers,
Benjamin Peterson
"There's nothing quite as beautiful as an oboe... except a chicken
stuck in a vacuum cleaner."


More information about the Python-3000 mailing list