Automated testing aside, I wholeheartedly support the idea of "cleaning up" our code so that when we inevitably move to Python 3.x the transition will be as painless as possible. In some cases these changes may even have performance benefits, like converting range() to xrange() in loops. By the way, if we are to do automated testing of this nature I would suggest it be done in the coverage rather than in the doctest framework. As results won't vary based on the system on which sage is running, doing it in the doctest framework will waste users' time. But really this only needs to be done manually, I think. Perhaps it can be part of the review process to get it done early on.
-Keshav On Jan 16, 8:39 pm, daveloeffler <[email protected]> wrote: > On Jan 16, 11:54 am, koffie <[email protected]> wrote: > > > To bad nobody still noticed suggestion number 2 > > 2. Could we maybe add some sort of "check for common bad practice" to > > the doctest or coverage framework, I think something like pylint with > > some sage specific plugins could be very usefull in the reviewing > > process. > > I noticed :-) > > My two cents: I think it's good practice to use a python source > checker (I'm fond of "pyflakes", which I found out about via a sage- > devel thread some while back). However, such programs don't work at > all on Cython code, and even on pure Python files, my experience is > that they tend to produce a lot of spurious warnings. For instance, we > have lots of "all.py" files whose purpose is simply to control what's > imported into the global Sage namespace; pyflakes consistently > complains "all.py: Name '[xxx]' imported but not used". So the output > needs a bit of human intepretation, and hence trying to automate it as > part of the doctest/coverage framework probably wouldn't work so well. > > David -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
