[Python-3000] pre-PEP: Enhancing buffer protocol (tp_as_buffer)

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Feb 27 00:59:36 CET 2007

Travis Oliphant wrote:

> If they can't do it easily, then they don't have to define the 
> release-function and Python will never call it.

The case I'm worried about is where the data can move,
so it really *needs* to be locked, yet the object has
no way of ensuring that. It would be impossible for
the object to correctly implement this kind of buffer

> If you want shape information you are going to have to allocate memory.

But only when the shape changes, not every time you
want a pointer to the memory.

I like Guido's idea of separating the shape/type info
from getting the memory pointer.


More information about the Python-3000 mailing list