[Python-Dev] Re: why

Greg Stein gstein@lyra.org
Sun, 15 Aug 1999 21:42:19 -0700

David Ascher wrote:
> Why does buffer(array('c', 'test')) return a read-only buffer?

Simply because the buffer() builtin always creates a read-only object,
rather than selecting read/write when possible.

Shouldn't be hard to alter the semantics of buffer() to do so. Maybe do
this at the same time as updating it to create read/write buffers out of
the blue.


Greg Stein, http://www.lyra.org/