[SciPy-Dev] PR 397: Getting rid of 2to3 (single codebase for Python 2 & 3)
Sat Jan 5 15:02:34 CST 2013
On Sat, Jan 5, 2013 at 1:15 PM, Pauli Virtanen <email@example.com> wrote:
> Prompted by this:
> here's a conversion of the Scipy code base runnable on Python 2.6 and
> 3.x without 2to3:
> That was fairly easy to do, and I suspect the case is the same for Numpy.
> But do we want to go this way? On the one hand, this is a cleaner way to
> go than relying on 2to3 --- which does not convert all semantic
> differences and can lead to some subtle bugs...
> On the other hand, well, you have to add list() around map() et al. to
> make them lists, and have to import xrange, izip et al. from a
> compatibility module.
> To me, overall, this doesn't look like a bad route to go. Thoughts?
+1 on this. For numpy/scipy code, supporting both 2 and 3 is not too
difficult, and should not cause too many performance issues.
More information about the SciPy-Dev