Greg Ewing <greg.ewing <at> canterbury.ac.nz> writes: > > This was a deliberate decision -- in fact I argued for it myself. > The buffer interface is meant to be a minimal-overhead way for > C code to get at the underlying data. Requiring allocation of > a PyObject would be too expensive.
Tuples are used everywhere throughout the interpreter and yet they are proper PyObjects. Even simple integers are often wrapped into PyLong objects (see the getitem/setitem protocol in Py3k). I doubt Py_buffers are more critical for performance than tuples and integers are. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com