
April 24, 2009
4:19 a.m.
Robert Kern wrote:
Doesn't the 2to3 tool do this conversion for you?
I have not seen it handling everything. It does not handle reduce, for example: print reduce(lambda x, y: x+y, [1, 2, 3]) is translated to print(reduce(lambda x, y: x + y, [1, 1, 1])) I guess an alternative to a compat module would be to extend 2to3, or maybe mixing the two approaches. My understanding is that 2to3 is "optimized" to get a single codebase for python 2.6 and 3.x, but we want to be compatible below (>=2.4). David