[Python-Dev] Silent Deprecation Candidate -- buffer()

Raymond Hettinger python@rcn.com
Sat, 29 Jun 2002 23:24:35 -0400


From: "Tim Peters" <tim.one@comcast.net>
> Guido's last eassy on the buffer interface is still worth reading:
>
>     http://mail.python.org/pipermail/python-dev/2000-October/009974.html

Thanks for the helpful pointer!  :)

> No progress on the issues discussed has been made since, and, to the
> contrary, recent changes go in directions Guido didn't want to go.

He sent me to you guys for direction.  The change was based on the advice I
got.
The point is moot because a) it's not too late to change course to returning
all buffer objects, b) because almost nobody uses it anyway, and c) it all
should
probably be deprecated.

> Note that he was in favor of both gutting and deprecating the buffer
object
> (as distinct from the buffer C API) "way back then" already.  The only
time
> I ever see buffer() used in Python code is in examples of how to crash
> Python <wink>.

Perhaps full deprecation (of the Python API not the C API) is in order.
It;s just one fewer item in the Python concept space.  Besides mmap()
and iterators have already addressed some of the original need.

> In practice, the positive way to look at it is that we've been following
> Finn Bock's advice with passion:
>
>     Because it is so difficult to look at java storage as a sequence of
>     bytes, I think I'm all for keeping the buffer() builtin and buffer
>     object as obscure and unknown as possible <wink>.

Sounds almost like silent deprecation to me <winks back>.


Raymond Hettinger