[Python-Dev] buffer interface considered harmful

Jack Jansen jack@oratrix.nl
Mon, 16 Aug 1999 11:49:41 +0200


> >...
> > well, I think the buffer behaviour is both
> > new and pretty funny:
> 
> I think the buffer interface was introduced in 1.5 (by Jack?). I added
> the 8-bit character buffer slot and buffer objects in 1.5.2.

Ah, now I understand why I didn't understand some of the previous 
conversation: I hadn't never come across the buffer *objects* (as opposed to 
the buffer *interface*) until Fredrik's example.

I've just look at it, and I'm not sure I understand the full intentions of the 
buffer object. Buffer objects can either behave as the "buffer-aspect" of the 
object behind them (without the rest of their functionality) or as array 
objects, and if they start out life as the first they can evolve into the 
second, is that right?

Is there a rationale behind this design, or is it just something that 
happened?
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm