Hacker News new | ask | show | jobs
by underyx 3675 days ago
Actually, it seems to me that everyone who is active in the community is already on Python 3 and is heavily in favor of upgrading.

The people who are still using Python 2 are the 'lazy' ones, who don't really care about the community at all; the ones who keep making comments like 'I just use whatever the `python` command starts.' I'm pretty sure these people couldn't maintain Python 2 by themselves.

1 comments

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.

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.