Josiah Carlson wrote:
> "Travis E. Oliphant" <[EMAIL PROTECTED]> wrote:
>>     abstractly as if it were. I believe, the PIL is where the idea of
>>     multiple buffer segments in the original buffer interface came
>>     from, I believe.
> 
> Remove the last "I believe" in that sentence and remove the commas. ;)
> 
>>     The buffer interface should allow discontiguous memory areas to
>>     share standard striding information.  However, consumers that do
>>     not want to deal with strided memory should also be able to
>>     request a contiguous segment easily.
> 
> I don't believe this is necessary.  While the point of the buffer
> interface is to offer direct access to memory regions of an object or
> structure, being able to ask "can I get a contiguous segment" isn't
> really reasonable. The response is either going to be "yes, that's how I
> represent it anyways" or "no, that's not how I represent the data".  But
> this bit of meta information is easily acquired by *getting* the buffer
> and checking the stride.

I think the point is for there to be something in the standard library 
or Python core that makes it easy for a consumer to *copy* the data to a 
contiguous memory segment in the event the consumer can't directly 
handle non-contiguous data (e.g. a C API function that takes the source 
object, a pointer to the destination memory block, and an optional slice 
object defining a subsection of the memory block to be retrieved)

Regards,
Nick.


-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to