> Question for all: is there a good reason for writing cdef functions? Or > should we make all cython functions cpdef? Python convention seems to > be to expose the internals of the class, but just mark (with "_" or > "__") the functions that are considered internal and may change without > warning. >
There are definitely some cases where you have to -- for instance, if the return type of your function is something like "int *", you're not going to be able to cpdef that. (Or, if you can, it's news to me.) I'm sure there are other reasons -- Rob will probably chime in with some as I'm typing this message. :) That said, there are a *huge* number of functions that do just need "cdef" turned into "cpdef" in the sage library. > I'm facing the doctesting dilemma brought up here with some other cdef > functions in another class. > Yeah, I agree that seeing "def _doctest_this_cdef_function" and writing a little wrapper can be annoying, but I just don't think there's another way around it in some cases. -cc --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---