Hacker News new | ask | show | jobs
by strenholme 2250 days ago
I saw a lot of hostility right here in 2019 when I pointed out some Python 2 programs are nay to impossible to port to Python 2: https://news.ycombinator.com/item?id=21258527
1 comments

None of the things you mentioned are particularly difficult though. In fact you're still in the realm of changes that can be trivially automated with https://python-modernize.readthedocs.io/en/latest/fixers.htm..., the three issues you describe are the print, xrange_six, and classic_division fixers.

It's certainly possible that there are parts of the migration that would be tricky, a quick skim of the file didn't give me any obvious ones, but it's also huge and hard to read, so I very well could have missed something.

Most of the truly challenging things to migrate involved some combination of extension modules, heavy metaprogramming (eval/exec), and apis which change significantly between 2 and 3 (most of which are string related, but some libraries also decided to do backwards incompatible things)