[Python-Dev] PEP: Adding data-type objects to Python
jcarlson at uci.edu
Sun Oct 29 18:35:57 CET 2006
"Paul Moore" <p.f.moore at gmail.com> wrote:
> On 10/29/06, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> > Travis E. Oliphant schrieb:
> > > Remember the context that the data-format object is presented in. Two
> > > packages need to share a chunk of memory (the package authors do not
> > > know each other and only have and Python as a common reference). They
> > > both want to describe that the memory they are sharing has some
> > > underlying binary structure.
> > Can you please give an example of such two packages, and an application
> > that needs them share data?
> To do this *without* needing the PIL and NumPy developers to
> co-operate needs an independent standard, which is what I assume this
> PEP is intended to provide.
One could also toss wxPython, VTK, or any one of the other GUI libraries
into the mix for visualizing those images, of which wxPython just
acquired no-copy display of PIL images, and being able to manipulate
them with numpy (of which some wxPython built in classes use numpy to
speed up manipulation) would be very useful.
Of all of the intended uses, I'd say that zero-copy sharing of
information on the graphics/visualization front is the most immediate
'people will be using it tomorrow' feature.
I personally don't have my pulse on the Scientific Python community, so
I don't know about other uses, but in regards to Martin's list of
missing features: "pointers, unions, function pointers,
alignment/packing [, etc.]" I'm going to go out on a limb and say for
the majority of those YAGNI, or really, NOHAFIAFACT (no one has asked
for it, as far as I can tell). Someone who knows the scipy community,
feel free to correct me.
More information about the Python-Dev