[Python-3000] pre-PEP: Enhancing buffer protocol (tp_as_buffer)
Travis Oliphant
oliphant.travis at ieee.org
Mon Feb 26 19:43:26 CET 2007
It was so nice to see many of you at PyCon this year. The event was
very well handled and congradulations are deserved all around.
I brought up the idea of the array interface several times. After I
heard Guido's keynote and saw the scheduled time-lines, I realized that
my approach should be to push for the array interface into Python 3.0 as
an enhancement/adaptation of the buffer protocol (which I have not heard
or seen much discussion about).
Later we can back-port the result to Python 2.6.
To encourage a useful discussion, I've started a Wiki that describes the
idea behind my proposal and placed it at:
http://wiki.python.org/moin/ArrayInterface
The basic idea is to define a memory-view object which is returned by
the buffer-protocol and contains not just a pointer to the memory but
also shape, stride, and data-format information.
It would be nice if there were also some additions to the Python C-API
to make it easy to work with this memory-view object, but I don't
envision needing to make this object available to Python directly.
I'm willing to work on this buffer protocol and maintain it as well in
the future.
Thanks for any comments and/or feedback.
Best regards,
-Travis
More information about the Python-3000
mailing list