[Python-Dev] PEP 3118: Extended buffer protocol (new version)
greg.ewing at canterbury.ac.nz
Fri Apr 13 01:34:59 CEST 2007
Travis Oliphant wrote:
> Because slicing NumPy array's already does it by holding on to a view, I
> guess having an object that doesn't hold on to a view in Python but
> "re-gets" it every time it is needed, would be useful.
I guess this problem doesn't arise in NumPy, because the size
of the memory block doesn't change once the array is created,
so locking isn't an issue.
But in the more general case, I think it would be surprising
if one object refused to carry out some operation just because
of the existence of some other object.
Also, keep in mind that dropping references to an object
isn't a guarantee that it will be deallocated immediately,
so there would need to be some kind of explicit closing
operation on the view object, making things more messy.
More information about the Python-Dev