Python 3 success story

Terry Reedy tjreedy at udel.edu
Mon Mar 30 19:28:16 EDT 2015


Last summer, a college student, who prefers Python to Java and Racket 
(her other CS course languages), wanted to do a year-long AI research 
project using PyBrain (for the ai part), numpy (required for PyBrain), 
and pygame (for animated displays).  We both preferred 3.x.  That was 
not an issue for pygame and numpy as compiled 3.4 Windows binaries  were 
easily available.

PyBrain, however, was '2.7 only'.  So I downloaded it, read the doc for 
2to3, and ran it to do the conversion.  Running the PyBrain test suite 
did not work because it uses fragile doctests. Looking at the non-test 
code, I could see that it mostly used things that did not change in 3.x 
and a few things that should have been converted correctly.  This all 
took maybe an hour, certainly less than 2.

So I suggested going ahead and testing PyBrain by using it.  This 
appears to have worked out well. I believe the only 2-3 issue she ran 
into was a '/' that needed to become '//', that either 2to3 or I missed 
in the initial conversion. She had more problems with exception messages 
that she could not understand.  If anything, those have been improved in 
3.x (and such improvements continue).

-- 
Terry Jan Reedy




More information about the Python-list mailing list