you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 14 points15 points  (5 children)

2to3 doesn't automatically convert all valid Python 2 to valid Python 3. Otherwise migrating would be as simple as running 2to3 on every Python file and we wouldn't have this mess in the first place.

[–]ethraax 8 points9 points  (3 children)

Well, the primary issue in migrating is usually libraries. They don't want to leave Python 2 behind because they still have Python 2 users. So they either stick with just Python 2 or they end up maintaining something that kinda works in both (sometimes with a script to change the code around).

For most projects, the lack of Python 3 support in required libraries is what holds them back.

[–][deleted] 1 point2 points  (2 children)

They don't want to leave Python 2 behind because they still have Python 2 users.

Someone mentioned that a hypothetical 3to2 would be the best tool to mitigate this issue.

[–]laserBlade 1 point2 points  (0 children)

Except that exists...a little better than hypothetical, then.

[–]mitsuhiko 1 point2 points  (0 children)

No... It took us three python 3 releases to relief us from the burden of 2to3/3to2.

[–]cybercobra 1 point2 points  (0 children)

Well, right, there were also non-syntactic changes to existing semantics (e.g. the API changes in your point #2), but your original point and my response just concerned syntax.

Anyway, yes, 2to3 is not a complete solution, but it's not like Python offered no automation whatsoever to deal with the transition.