On Sat, Mar 3, 2012 at 3:14 AM, Stefan Behnel <stefan...@behnel.de> wrote:
> Stefan Krah, 02.03.2012 17:42:
>> The reason why this scheme was not chosen for a chain of memoryviews
>> was that 'exporter' (in theory) could implement a slideshow of buffers,
>> which means that in the face of redirecting requests m might not be
>> equal to nd.
>
> Right. Then it's only safe when the intermediate provider knows what the
> underlying buffer providers do. Not unlikely in an application setting,
> though, and it could just be an option at creation time to activate the
> delegation for the ndarray above.

OK, my take on the discussion so far:

1. assert() is the wrong tool for this job (it should trigger a Python
error message)
2. the current check is too strict (it should just check for obj !=
NULL, not obj == &exporter)
3. the current check is in the wrong place (it should be in PyObject_GetBuffer)

Sound about right?

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to