[Python-Dev] Py2.6 ideas

Edward Loper edloper at gradient.cis.upenn.edu
Sat Mar 17 20:57:40 CET 2007

On Feb 15, 2007, at 2:59 PM, Raymond Hettinger wrote:
> * Enhance doctest with a method that computes updated doctest  
> results.  If the
> only change I make to a matrix suite is to add commas to long  
> numbers in the
> matrix repr(), then it would be nice to have an automated way to  
> update the
> matrix output on all the other test cases in the module.

A while back I wrote up a command-line doctest driver that does this  
and more [1].  The output of "doctest_driver.py --help" is below;  
note in particular the --update and --debug options.  I also wrote an  
emacs mode [2] that has support for running doctest & putting the  
output (^c^c) or diffs (^c^d) in an output buffer; and for updating  
the output of selected examples (^c^r).  I never really got around to  
doing official releases for either (although doctest-mode.el is part  
of the python-mode.el package).

I could move some of this code into the doctest mode, if it seems  
appropriate; or I could just go ahead and release the driver and  
publicize it.


[1] http://nltk.svn.sourceforge.net/viewvc/nltk/trunk/nltk/nltk_lite/ 

[2] http://python-mode.svn.sourceforge.net/viewvc/*checkout*/python- 

More information about the Python-Dev mailing list