On Fri, Sep 21, 2012 at 9:37 AM, David Beazley <d...@dabeaz.com> wrote:
> A memory address is a number.   I think an integer is fine--if you're working 
> at this level, you're already on your own and expected to know what you're 
> doing.  I'd prefer to just get the raw address without yet another level of 
> indirection.
>
> Other parts of the library already do this.   For instance 
> array.buffer_info().

I'm fine with exposing a memoryview.buffer_address attribute in 3.4.
The idea had never come up before, as the idea of using *Python code*
(rather than C) to provide the shim between a PEP 3118 exporter and a
consumer that doesn't understand that API isn't a use case we had even
considered. memoryview has instead been more focused on *interpreting*
the contents of exported buffers as ordinary Python objects.

(We already know we still need to define an API to let classes defined
in Python implement the buffer API, though)

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