mmap only supports string
Neal Becker
ndbecker2 at gmail.com
Wed Jan 7 21:14:50 EST 2009
Problem is, AFAIK a string can only be created as a copy of some other data. Say I'd like to take some large object and read/write to/from mmap object. A good way to do this would be the buffer protocol. Unfortunately, mmap only supports string. A string could only be created after copying the original object AFAIK.
I think mmap should work directly with buffer protocol, so it could directly read/write with objects supporting buffer protocol. Specifically, mmap slice should support buffer protocol.
More information about the Python-list
mailing list