[SciPy-user] python (against java) advocacy for scientific projects

Sturla Molden sturla@molden...
Tue Jan 20 06:35:22 CST 2009


On 1/20/2009 11:50 AM, Sebastien Binet wrote:


> On the same note, I always wondered if one could not sidestep the for-loop 
> overhead with an ad hoc Context manager which would suppress/shortcut the 
> dynamic nature of python for very localised pieces of code:
>  with NotDynamic() as ctx:
>    for i in xrange(10):

Yes, and one could also use a decorator on a function to achieve a 
similar effect.

@nativecompiled
def foobar():

And in Python 3.0 there are optional type annotations which could be 
exploited.

Cython or RPython could be used as compiler.



S.M.


More information about the SciPy-user mailing list