[Python-Dev] pre-PEP: The Safe Buffer Interface

Thomas Heller thomas.heller@ion-tof.com
Thu, 1 Aug 2002 10:31:56 +0200


From: "Greg Ewing" <greg@cosc.canterbury.ac.nz>
> Scott Gilbert <xscottg@yahoo.com>:
> 
> > getreadbufferproc bf_getreadbuffer;
> > getwritebufferproc bf_getwritebuffer;
> >
> > acquirereadbufferproc bf_acquirereadbuffer;
> > acquirewritebufferproc bf_acquirewritebuffer;
> 
> Is there really a need for both "get" and "acquire"
> methods? Surely if an object requires locking, it
> always requires locking, so why can't the "get"
> functions simply include the locking operation
> if they need it?

Backward compatibility.
If we change the array object to enter a locked state
when getreadbuffer() is called, it would be surprising.

Thomas