[SciPy-dev] How to get extensions to affect local state

Fernando Pérez fperez at pizero.colorado.edu
Mon Feb 11 15:35:41 CST 2002


> Fernando has expressed wanting to explicitly return values from weave.inline
> instead of having variables flow back out of C into Python.  We could put a
> flag into to turn this off if people really want that.

I think I made that comment in the mindset that currently inline() is still a
'special' thing, and  I tend to think of the C code as a very particular
little space all to itself. But if inline becomes natural enough that all data
flows in (all variables automatically, easy callbacks, etc) as you guys seem
to be shooting for, then I guess I'd accept that it would be far more natural
to also return values in the same way. Because at that point it would truly
satisfy Eric's idea of "same algorithm, different syntax/speed" which is what
we all seem interested in. The trick is, this has to be 100% reliable,
otherwise I prefer to stick to the current (more manual) approach. 

But if getting hold of the frame in C:

 1- doesn't clash with anything else (as trying to modify locals() does)

 2 -it's approved enough by the powers that be that we don't expect it to
randomly break with the next version of Python

then by all means do it!

By the way, I have to say I was *very* excited reading today's various
messages from  Eric et gang. It really seems that python is taking off for
serious scientific computing. In that sense, I strongly second the suggestion
of getting serious review of the algorithms into the process, so we don't end
up  simply with "Numerical Recipes in a scripting language".

Cheers,

f.




More information about the Scipy-dev mailing list