On Sun, Oct 31, 2010 at 11:38 AM, Stefan Behnel <[email protected]> wrote: > Stefan Behnel, 31.10.2010 08:27: >> Stefan Behnel, 30.10.2010 21:16: >>> can now write something like this for a type that you only use internally >>> in your module: >>> >>> @cython.final >>> @cython.internal >>> cdef class _MyInternalType: >>> ... >> >> One problem I spotted was the auto test dict (again). It takes the classes >> from the module dict if they have a docstring, which now fails for internal >> types (it would also fail for 'del'-ed types, BTW). I always wondered why >> it used the module dict anyway - I guess it's just simplicity. Any reason >> not to rewrite that? > > 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). - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
