I'd like to suggest some improvements from mmap 1) mmap assign to slice only accepts a string. This is unfortunate, because AFAIK a string can only be created by copying data, and this is wasteful for large data transfers. mmap should accept any object supporting buffer protocol as well as string. 2) buffer (mmap_obj) gives a read_only buffer. There should be a way to make this read_write. I suggest 'as_buffer' member. 3) mmap_obj does not support weak ref. This is needed for proper lifetime management using boost::python
As for 2), the buffer() function is deprecated and is replaced in 3.0 by new object called memoryview() (together with a revamped internal API for taking and releasing buffers).
1) and 2) have been fixed in Python 3.x. mmap supports writable memory views and slice assignment from any object that supports the buffer protocol. 3) is still an issue as mmap objects are not weakref-able yet. It should be easy to add __weakref__ to mmap objects.