Haoyu Bai, 03.04.2010 09:18:
> Thinking about how to implement Cython decorators (@cclass, @cfunc
> etc.) for pure Python mode, I come up with an idea of "compile-time
> decorator". Basically, we want these decorators to have effect during
> compile time, rather than normal Python decorator that is called in
> runtime. So, to implement @cfunc, we can actually implement a function
> cfunc(node), which inputs a DefNode and transform it to a
> CFuncDefNode, then put the function into the compile-time scope.

-1, we shouldn't expose Cython compiler internals to the language level.

It's better to use a transform that intercepts on certain decorators.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to