On 05Aug2018 23:55, eryk sun <eryk...@gmail.com> wrote:
On Sun, Aug 5, 2018 at 11:28 PM, Cameron Simpson <c...@cskk.id.au> wrote:
It seems obvious to me that a method returning a memoryview of the mapped
file would be very handy here: no data copies at all, and not even any I/O
unless the data are accessed. But I see no such method in the documentation.

mmap objects support the buffer protocol. Pass the mmap object to
built-in memoryview().

As I've just discovered not 30 seconds before seeing your post :-)

Thanks, this is what I'll be doing!

Cheers,
Cameron Simpson <c...@cskk.id.au>
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to