Python 3

Danny van Heumen danny at dannyvanheumen.nl
Thu Jun 24 19:19:30 BST 2010


(Small disclaimer: I'm not that familiar with python, but am interested
to learn and I think this thread is particularly interesting. The
following question came to my mind. Okay, so it might be rubbish - if so
just say it and I'll shut up :) ...)

I'm wondering. If 2.4 <--> 3.1 is too broad to support, and 2.6 is
better suited to convert to 3.x, since it supports some of the 3.x
constructs.

Would it be feasible to write code in a 2.6 compatible style and
automagically convert it to 2.4?

I mean, I think the most issues I've seen raised are issues like:
'except Foo as e' is not recognized in python 2.4, and 'with x as f' is
not supported.
But, if I understood it correctly, all of these constructs can be
expanded to a form that is understable by 2.4.

So, suppose that you should avoid (complex) modules that were introduced
in python 2.6, would it be feasible to just convert the basic constructs
to 2.4? (That way you can build to a more 3.x compatible code base.)


On 06/23/2010 09:16 AM, Ben Finney wrote:
> Russel Winder <russel at russel.org.uk> writes:
> 
>> On Wed, 2010-06-23 at 16:11 +1000, Martin Pool wrote:
>>> One of the major points of this thread and previous ones is that we
>>> are not prepared to give up 2.4 support yet. I do realize that it
>>> would be easier to support 3.x if we dropped 2.4 but we're not going
>>> there yet.
>>
>> As far as I am aware you have to go to 2.6 and drop all pre-2.6 idioms
>> to have any chance of 2to3 and 3to2 being useful.  With 2.4 and 2.5
>> factors in the equation, then looking at 3 is for the future --
>> certainly this is the view in the SCons team.
> 
> +1.
> 
> I think Python 2.4 ↔ 3.1 is too broad a range to try supporting from a
> single code base. This is exacerbated by the fact that Python 2.4 and
> 2.5 are not receiving upstream support, and Python 2.6 will soon be
> receiving very little attention upstream (once Python 2.7 is released).
> 



More information about the bazaar mailing list