[Python-Dev] Proposed 3.0 compatiblity module (original) (raw)

Phillip J. Eby pje at telecommunity.com
Tue Jan 16 23:07:26 CET 2007


At 08:52 PM 1/16/2007 +0000, Steve Holden wrote:

I foresee that many people would be happy restricting their 2.X source slightly to ensure perfect translation into (working, no necessarily optimal) 3.0. Under those circumstances the 2to3 tool wouldn't necessarily have to translate all valid 2.X to 3.0.

Actually, it would be several times more preferable to either have that restricted subset of code run on 3.0 without translation, or for translated code to still be usable in 2.X.

I have often been in the habit of running test suites back-to-back on multiple versions of Python while doing test-driven development, so having a repeated translation step would interfere with that. Ideally, a translation should be necessary one time only -- in which case requiring manual cleanup steps isn't as big of a problem.

The idea here being that, once 2.6 is widely-enough deployed that it can be assumed as a base for one's users, you can simply run the translator once, do any cleanup, and then have 3.0-clean code that also still runs for your installed base.

That way, there's no chasm to leap; just a code cleanup.



More information about the Python-Dev mailing list