[Python-Dev] Re: About Pyrex

Greg Ewing greg@cosc.canterbury.ac.nz
Wed, 10 Apr 2002 21:30:06 +1200 (NZST)

> In my world your example is not very typical. The algorithms that I
> push to the compiled part of the system are usually operations that
> work on arrays, and almost universally involve custom types
> (classes).

I know it's probably not typical, but it's the best I could come
up with on the spur of the moment with the amount of Pyrex
that currently works.

I can think of analogous things that could arise in real life,
though, e.g. if you're wrapping an FFT algorithm or linear
algebra package or something, and you want to be able to pass
your data in and out as lists of floats without having to
put them in a special data structure first.

> Boost.Python gets around this by making it very easy to expose custom
> types (C++ classes) to Python, incl. methods, dictionary, pickle
> support etc. You may view Boost.Python as a high-performance extension
> class factory.

Yes, I can see that. Something similar is planned for
Pyrex, too.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+