Am 02.03.2011 23:36, schrieb Jérôme Radix:
No, I don't do it now. But taking like granted the fact that 2.x python will be dead in 5 years and that /usr/bin/python will point to python3 is, imho, a little too optimistic.
I don't think Steven said, or assumed, a scope of 5 years - more like a scope of 30 years. In 30 years, Python 2 will surely be dead (as will likely be Python 3). The defensive programming you promote is likely to fail. Many Python 2 scripts are syntactically invalid when interpreted as Python 3, so a version test won't even be executed. With separate python2 and python3 executables, people can have scripts depend on the right binary. In interactive mode, I would like to use /usr/bin/python be the "current" Python binary always (even when Python 4.6 comes along). Python will, interactively, greet me with its version number, and I can adjust. So the idea of /usr/bin/python being reserved for Python 2 strikes me as inconvenient. Regards, Martin