why doesn't an mmap.mmap object have some kind of memoryview method?

eryk sun eryksun at gmail.com
Sun Aug 5 19:55:37 EDT 2018


On Sun, Aug 5, 2018 at 11:28 PM, Cameron Simpson <cs at 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().



More information about the Python-list mailing list