[Python-Dev] PEP 298, final (?) version

Aahz aahz@pythoncraft.com
Fri, 2 Aug 2002 09:25:56 -0400


On Thu, Aug 01, 2002, Scott Gilbert wrote:
> --- Aahz <aahz@pythoncraft.com> wrote:
>>
>> <whew!>  I finally read all these threads today, cleaning out much of my
>> OSCON backlog.  Now, maybe I'm stupid, but I'm not understanding the
>> relationship between the new buffer protocol (PEP 298) and the new bytes
>> object (PEP 296).  Should this be something documented in one or both
>> PEPs?
> 
> In the course of examining PEP 296 (the one I'm working on), Thomas Heller
> thought it would be a good idea to make some additions to PyBufferProcs and
> abstract.h so that he, and others, could treat a wider class of objects
> with one API.  I was only proposing the bytes object, where as he wanted to
> be able to write code that works with bytes, string, mmap, array, and any
> other buffer-like object uniformly (since they all make promises about the
> lifetime of the pointer).

Seems to me that part of my confusion lies in the fact that PEP 296 says
that the bytes object is suitable for implementing arrays, whereas the
discussion surrounding PEP 298 coughed up the issue that pure fixed
buffers without locking were insufficient for arrays.  
-- 
Aahz (aahz@pythoncraft.com)           <*>         http://www.pythoncraft.com/

Project Vote Smart: http://www.vote-smart.org/