A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-September/121794.html below:

[Python-Dev] Memoryviews should expose the underlying memory address

[Python-Dev] Memoryviews should expose the underlying memory address [Python-Dev] Memoryviews should expose the underlying memory addressNick Coghlan ncoghlan at gmail.com
Fri Sep 21 05:19:06 CEST 2012
On Fri, Sep 21, 2012 at 9:37 AM, David Beazley <dave at 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   |   ncoghlan at gmail.com   |   Brisbane, Australia
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4