[Numpy-discussion] [Fwd: python-dev Summary for 2006-11-01 through 2006-11-15] - further discussion on buffer description

Colin J. Williams cjw at sympatico.ca
Tue Nov 28 09:47:30 EST 2006



-------- Original Message --------
Subject: python-dev Summary for 2006-11-01 through 2006-11-15
Date: Mon, 27 Nov 2006 04:52:10 +0000 (GMT)
From: steven.bethard at gmail.com
Newsgroups: gmane.comp.python.general

python-dev Summary for 2006-11-01 through 2006-11-15
++++++++++++++++++++++++++++++++++++++++++++++++++++

.. excerpt::

[The HTML version of this Summary is available at
http://www.python.org/dev/summary/2006-11-01_2006-11-15]


---------------------------------------------------------------
The buffer protocol and communicating binary format information
---------------------------------------------------------------

The discussion of extending the buffer protocol to more binary formats 
continued this fortnight. Though the PIL_ had been used as an example of 
a library that could benefit from an extended buffer protocol, Fredrik 
Lundh indicated that future versions of the PIL_ would make the binary 
data model completely opaque, and instead provide a view-style API like::

     view = object.acquire_view(region, supported formats)
     ... access data in view ...
     view.release()

Along these lines, the discussion turned away from the particular C 
formats used in ``ctypes``, ``numpy``, ``array``, etc. and more towards 
the best way to communicate format information between these modules. 
Though it seemed like people were not completely happy with the proposed 
API of the new buffer protocol, the discussion seemed to skirt around 
any concrete suggestions for better APIs.

In the end, the only thing that seemed certain was that a new buffer 
protocol could only be successful if it were implemented on all of the 
appropriate stdlib modules: ``ctypes``, ``array``, ``struct``, etc.

.. _PIL: http://www.pythonware.com/products/pil/

Contributing threads:

- `PEP: Adding data-type objects to Python 
<http://mail.python.org/pipermail/python-dev/2006-November/069706.html>`__
- `PEP: Extending the buffer protocol to share array information. 
<http://mail.python.org/pipermail/python-dev/2006-November/069709.html>`__
- `idea for data-type (data-format) PEP 
<http://mail.python.org/pipermail/python-dev/2006-November/069733.html>`__





More information about the NumPy-Discussion mailing list