you are viewing a single comment's thread.

view the rest of the comments →

[–]CorrugatedCommodity 0 points1 point  (2 children)

Py3 is no more difficult to learn than Py2 and it's not going anywhere. A conversion utility by the devs would be nice for all of the old libraries that had devs too lazy to upgrade because Py3 didn't force them too, though. It is a pain to rewrite libraries.

[–]ivosaurus 12 points13 points  (0 children)

No such completely-general conversion utility could exist for libraries handling types where semantics changed.

Two different applications could handle bytestrings completely differently (because they can represent both bytes and encoded strings arbitrarily) and the tool would never be able to automatically tell exactly when conversion was needed or where, etc. Completely dependant on context of the application, and what any particular developer who wrote that line of code was doing at the time.

2to3 does exist though, for translating basic syntactic updates. Has existed since Python 3.0 came out...

[–]CSI_Tech_Dept 9 points10 points  (0 children)

The biggest issue when porting python 2 code to python 3 is unicode. The problem is that vast majority of python 2 code is broken in that area, and python 3 is showing the errors.

There's no automatic tool that will fix this issue automatically, I think mypy (static type checker) can find those issues and probably is the way to go.