extending Python - passing nested lists

Arnaud Delobelle arnodel at googlemail.com
Tue Jan 29 14:45:27 CET 2008


On Jan 29, 1:22 pm, Christian Meesters <meest... at uni-mainz.de> wrote:
> Thanks. Point is that all such approaches would require lots(!) of calls to
> the Python API - a way by which I won't gain the desired speed.

You didn't mention speed in your original post.  What about using
array.array?  Unless I am mistaken, these are just a thin wrapper
around normal C arrays.  Anyway you could always convert your list
into a c array, do lots and lots of fast calculations, then convert it
back again to a list.

--
Arnaud



More information about the Python-list mailing list