> I may be missing something about your use cases, but is there any > reason you're passing/storing function pointers all over the place > instead of just calling cdef methods on a cdef class? That would > probably make your code a lot cleaner and easier to understand (and > write).
Well, that might be due to me being a newbie ;0) Let me briefly explain my problem and idea: I need to a apply a discrimination function on some data, depending on the structure of these data, the discri fn can take two forms (possibly more in the future). Rather than to use an if / else test at each iteration to branch to the relevant function, I do the test once at the beginning (first time I see the data) and then define via a pointer which fn to use. Same thing for the locate function, which can vary depending on the available data. I hope this make sense, and when not, I am more then willing to learn of a better approach... I am learning the hard way! JF _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
