[Python-Dev] buffer objects

Scott Gilbert xscottg@yahoo.com
Thu, 2 May 2002 04:02:23 -0700 (PDT)

I recently submitted a (really tiny) patch to allow the buffer() builtin to
return a read/write PyBufferObject when possible.  Mostly this was just to
get my feet wet on the patch submission process, but I also think it is the
correct behavior (am I wrong about this?).  Being new at this, I don't
know: Am I supposed to find a committer to champion my patch?

Also...  Several weeks ago, I brought up the suggestion that arraymodule.c
arrays should be able to pickle directly and efficiently.  I've since found
out that the topic of arrays is a complicated one, and now I'm wondering if
anyone else thinks that buffer objects should pickle.

I look at buffers as mutable byte-strings.  Having buffers pickle/unpickle
(without a temporary copy) would avoid most of the questions about data
types/sizes, endian-ness, ..., while allowing things which built on top of
buffers (array modules for instance) to pickle efficiently.

Just curious if a patch along these lines would be received well (assuming
it's a good patch).


Do You Yahoo!?
Yahoo! Health - your guide to health and wellness