Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The link appears to be a few years old now, so its advice here I think is a bit out of date. And some might argue it would have been out of date in 2014 as well.

It should probably be updated to say that unless you have a VERY strong reason to use 2.7, use 3. And even then, probably still use 3, because your reasons probably aren't as strong as you think they are.

EDIT: Generally the strong reasons most people had for using py2.7 for new projects were some variant of: "X, Y and Z libraries I need only support 2.7". But now and days, that actually stands as more of a reason to find alternate libraries.



The last two things I have on Python 2 are:

- code that has to run on HostGator shared hosting. They only support Python 3.2, the "maximally incompatible" version.

- code that has to run on ROS, the Robot Operating System. ROS is a huge collection of packages from various sources glued together by a message passing system. Efforts to convert all those packages to run under Python 3 have been underway for years, but aren't done yet.


Why does the code that "has to run on HostGator shared hosting" has to live there specifically, if you can say? It should be a simple project to move that code somewhere else.


I've never heard of Robot OS, looks interesting! Yea, unfortunately its the niche stuff like that which experience the most problems (or at least I assume its fairly niche - I do nothing with robotics).

In those cases, one can, without too much effort, write forward-compatible python 2 code at least.


Interestingly, most of ROS (core) is py3 compatible. Its only a lot of the libs that aren't. Unfortunately, that includes some very common libs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: