On Dec 4, 2009, at 2:54 AM, Dag Sverre Seljebotn wrote: > Lisandro Dalcin wrote: >> On Fri, Dec 4, 2009 at 12:31 AM, Stefan Behnel >> <[email protected]> wrote: >>> Lisandro Dalcin, 04.12.2009 02:42: >>>> Am I missing something? Or was this an oversight (for 0.12 final)? >>> Hmm, not sure if it *should* be on by default, but does it break >>> anything? >>> >> >> It do not break my code, but some reason I do not understand one of >> the extension modules in mpi4py have and the other does not have a >> __test__ attribute. In the module that have it, the value is a empty >> dict. >> >> I still cannot figure out why one module has __test__, and the other >> does not. Could it be that the ABSENCE of class&method docstrings >> would trigger the setattr of __test__ in the module namespace? I'm >> really lost. >> >> Still, I think Cython should not add stuff in module namespaces >> unless >> explicitly asked for... > > Well, it was discussed, and it seemed like there was no opposition at > the time to leave it on by default -- so that was intentional.
Well, there was a little bit of concern that it might break stuff, but I think we took care of the corner issues. > It was by principle of least surprise -- people would usually expect > "doctest.testmod(mycythonmodule)" to just work, and it doesn't without > this. Myself I've wasted at least an hour in total just by forgetting > that Cython modules couldn't be doctested :-) > > Also it's already in use in the Cython test suite. Robert moved a > lot of > the docstrings into the functions (and the test suite now looks a lot > better). If we turn it off by default, we have to turn it on in every > test case in our test suite...(or in runtests.py, but that's rather > obscure, -1 on that). It probably wouldn't be too hard to turn it on for just our runtests, but fortunately it looks like it's not causing any issues out in the wild. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
