[OT] fortran lib which provide python like data type

2015-01-29 Thread 1989lzhh
Hi, I am not sure here is the right place to ask this question, but I want to give it a shot:) are there fortran libs providing python like data type, such as set, dict, list? Thanks, Yours liuzhenhai -- https://mail.python.org/mailman/listinfo/python-list

基于cython的即时编译器cyjit,欢迎大家提建议

2014-06-11 Thread 1989lzhh
我正在写一个使用cython code作为后端的即时编译器名为cyjit,将python code 转换为cython code再编译为c extension导入.设计上主要参考numba.jit的思路,使用decorate来指定要编译的function,例如: from cyjit import jit @jit('int(int,int)') def add(a,b): return a+b add(1,2)#compiled @jit('int(int,int)', locals=''' int c ''') def add1(a,b):

Re: 基于cython的即时编译器cyjit,欢迎大家提建议

2014-06-11 Thread 1989lzhh
sorry,wrong version post 发自我的 iPhone 在 Jun 12, 2014,0:16,mm0fmf n...@mailinator.com 写道: On 11/06/2014 10:37, 1989lzhh wrote: 我正在写一个使用cython code作为后端的即时编译器名为cyjit,将python code 转换为cython code再编译为c extension导入.设计上主要参考numba.jit的思路, 使用decorate来指定要编译的function,例如: from cyjit import jit @jit

Re: 基于cython的即时编译器cyjit,欢迎大家提建议

2014-06-11 Thread 1989lzhh
在 Jun 12, 2014,1:16,Skip Montanaro s...@pobox.com 写道: You might say that but I couldn't possibly comment. You could run the message through Google Translate. It's not publication quality translation, but serves the needs in this instance. (Gmail offers to translate the OP's message for

A JIT compiler 'cyjit' using cython code as a backend

2014-06-11 Thread 1989lzhh
I'm writing a JIT compiler named cyjit using cython code as a backend. It designed primarily reference numba.jit. the jitted python function will be converted to cython code then compiled to c extension. Use decorate to specify compiled function. for example: from cyjit import jit @ jit

strange behaivor of nested function

2014-06-07 Thread 1989lzhh
here is code def make(): def jit(sig): def wrap(function): sig=sig[0] # unbound local error, if change to sig='' would be just fine return function return wrap return jit jit=make() @jit('') def f(): pass It is strange that the interpreter

How to use imported function to get current globals

2014-06-07 Thread 1989lzhh
Here is the code m1.py def f(): print globals() m2.py from m1 import f f()# how to get current module's globals? -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use imported function to get current globals

2014-06-07 Thread 1989lzhh
发自我的 iPhone 在 Jun 8, 2014,4:52,Chris Angelico ros...@gmail.com 写道: On Sun, Jun 8, 2014 at 3:40 AM, 1989lzhh 1989l...@gmail.com wrote: Here is the code m1.py def f(): print globals() m2.py from m1 import f f()# how to get current module's globals? As Ian said, you almost

Re: How to use imported function to get current globals

2014-06-07 Thread 1989lzhh
scope f()# now f is a compiled function 发自我的 iPhone 在 Jun 8, 2014,10:24,Dave Angel da...@davea.name 写道: 1989lzhh 1989l...@gmail.com Wrote in message: Here is the code m1.py def f(): print globals() m2.py from m1 import f f()# how to get current module's globals? As others