Robert Bradshaw, 01.11.2010 21:44: > On Sun, Oct 31, 2010 at 11:38 AM, Stefan Behnel wrote: >>> One problem I spotted was the auto test dict (again). >> >> I simplified it now to use the compile time docstrings directly, instead of >> looking them up at runtime. I don't think this breaks anything important, >> as the docstrings of functions and methods cannot be modified anyway. On >> the plus side, it removes a *ton* of ugly C code, and also saves some time >> during module initialisation. > > Excellent! I've been wanting to do this myself, eventually when I > found the time. This means that cdef methods could have tested > docstrings as well (though, of course, they couldn't be called > directly).
That was easy to implement, so I tried it. In lxml.etree, it adds some 10KB to the size of the module source code as the docstrings of cdef functions wouldn't otherwise end up there. Personally, I'm not sure it's worth it. If you can't call a cdef function/method from a doctest directly, why not just move the doctest itself to the function or method that you would have to call anyway? Stefan _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
