Re: [Cython] [ENH] Compile-time code execution (macros / templates)

2021-02-23 Thread Prakhar Goel
I had similar ideas in the past (assuming I understand your proposal). I'd love it if a decorator could link to some python function. This python function would get something that represents the cdef function (with the ast). It would then return a transformed ast that could be spliced into the orig

[Cython] [ENH] Compile-time code execution (macros / templates)

2021-02-23 Thread Celelibi
Hello. I was going to post this as an issue on github, but since it's the idea isn't complete, I guess this mailing list is better suited. I read (not in too much details, though) the related CEP, and I feel they either do too little or too much. In my idea, there is some syntax (or decorator) an