3 ms·
Unfortunately, you're dead right --- this sucks in C and it sucks in Cython! I don't understand why .pxd files are necessary --- they should be generateable fr
by syllogism 12y ago
Unfortunately, you're dead right --- this sucks in C and it sucks in Cython!
I don't understand why .pxd files are necessary --- they should be generateable from the .pyx files. At some point I'll have a go at this...
But, as of now, you need to maintain this separate file, which you must keep synchronised to changes in the original. And, yes --- this sucks!
The only mercy is that writing code in the headers is illegal.
- andreasvc 12y agoIt is not illegal to write code in pxd files. For cdef functions to be inline-able across modules, they need to be specified in a pxd file. But that is the exception to the rule.