[Python-Dev] Deprecate the buffer object?

Greg Ewing greg at cosc.canterbury.ac.nz
Thu Oct 30 22:37:51 EST 2003

Neil Schemenauer <nas-python at python.ca>:

> I don't think the buffer hash method can depend on the data being
> pointed to.  There is nothing in the buffer interface that tells
> you if the data is immutable.  The hash method could return the id
> of the buffer object but I'm not sure how useful that would be.

How about just having it call the hash method of the base
object? If the base object is hashable, this will do something
reasonable, and if not, it will fail in the expected way.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list