[Cython] Visitors and compiling Cython in Cython
Stefan Behnel
stefan_ml at behnel.de
Mon May 12 13:04:49 CEST 2008
Hi again,
Dag Sverre Seljebotn wrote:
> #cython: cdef Visitor:
> class Visitor:
>
> #cython: cdef object pre_FuncDefNode(FuncDefNode node):
> def pre_FuncDefNode(node):
What about just using plain old "cdef" to make it valid Cython code, and then
run a cy2py tool over it in setup.py that strips it down into valid Python
code? That's how 2to3 works. The tool could just bail out if it finds anything
that's not pythonisable, such as cimports and C pointer types.
The down side is obviously that this would prevent us from running Cython from
the source directory ...
Stefan
More information about the Cython-dev
mailing list