Hey Dima, As I understand it, you do not need to include doctests for cdef methods because we cannot test them in isolation. It should not be a pure python method unless it has to be for some reason. However it is not necessarily a bad thing to include some doc about the method and a quick (indirect) doctest...
Best, Travis PS - In case the reviewer is reading this, don't you always want fast code? On Friday, August 14, 2015 at 11:47:00 AM UTC-7, Dima Pasechnik wrote: > > I have the following Cython design under review: > ------------------- > cdef helper(x): > .... > > def A(..): > return helper(foo) > > def B(..): > return helper(blah) > > ------------------- > > A and B are properly documented, doctested, etc etc > The reviewer insists that helper() must be turned into pure Python > function and > doctested on its own, while I find this not needed, as tests in A and B > suffice. > > He accuses me of using cdef just because I do not want to write doctests. > The module in question already has a number of cdef'd functions without > doctests, written > by the reviewer and positively reviewed by me some time ago. > When I point this out to the reviewer, I hear that these functions must be > fast, so this is why > they are cdef'd. > > Your opinions? > > Thanks, > Dima > > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.