[Python-Dev] Fw: Behavior of buffer()

Thomas Heller thomas.heller@ion-tof.com
Fri, 12 Jul 2002 21:19:53 +0200

> > What do you mean by 'works well with the mmap and array modules'?
> I'm not sure, since I don't know what your memory object does (and
> frankly, I don't really understand what the mmap module does either
> :-).
"Memory-mapped file objects behave like both strings and like file objects.
Unlike normal string objects, however, these are mutable."
More in the Python manual...

Optionally they can be backed up by files in the file system,
and optionally they can be shared between processes. At least that's
what they are under Windows.

> I was just mentioning these because they are other modules that have
> been used and/or proposed for buffering needs.

Now that you mention this, mmap could be used as a 'memory' object,
although it would have to be converted into a new style class.

My own memory object currently supports a private protocol
which dosn't make sense for core Python. But that can be fixed.