Hacker News new | ask | show | jobs
by wink 3675 days ago
I have a reasonably large project that was started in late 2013 (so only 2.5 years ago) when 2.7 was already long "to be deprecated" but some of the key libraries used were not yet python 3 compatible.

I haven't actually checked, it could probably be ported now - but why would you do that now - everything can change in the next 3 years.

1 comments

We're over the hump if something would change and still was python it would most likely be compatible with python 3.

There two things that might help you port things:

1. You can use Cython to mix python 2 and python 3 code together. You compile python2 code as a module and then reference it from the python3.

2. MyPy (http://mypy-lang.org/) - This might not seem like related, but if you provide information about types refactoring the code becomes much easier (like in statically typed languages) so when you change something it's easier to find all other places that also need to be changed. Some IDEs (for example PyCharm) also understand typing which helps when using their refactoring functionality.