Pep 3105: the end of print?

Stefan Rank list-ener at strank.info
Fri Feb 16 09:36:24 EST 2007


on 16.02.2007 13:02 Edward K Ream said the following:
>> There are a tool called "2to3" that translates things like "print foo" to 
>> print(foo).
> 
> The point of my original post was that if I want to maintain a common code 
> base the tool must translate 'print foo' to 'print2(foo)'.

I think you are misunderstanding the purpose of the 2to3 tool.
It is supposed to create a new version of the code that runs on py3,
while you can still run your *"old"* code on py2.x

There won't be a common code base for all python versions.
You will have to decide at what point you want to switch from developing 
the 2.x code (and using the 2to3 tool to support py3) to developing the 
py3 code.

(You might then develop a 3to2 tool, but I think this discussion is 
getting way ahead of its time. ;-)




More information about the Python-list mailing list