3 ms·
python will always point to version 2 because version 2 syntax and version 3 syntax are mutually incompatible; one is not a subset of the other. Making python s
by dheera 11y ago
python will always point to version 2 because version 2 syntax and version 3 syntax are mutually incompatible; one is not a subset of the other. Making python suddenly point to version 3 would break a huge number of scripts already out there, including numerous setup and configure scripts.
- takeda 11y agoI have yet to write a code where I was unable to make it work on both py2 and py3.
- kbenson 11y agoI remember Python 1 and Python 2 having this problem, it was done before, so it's not impossible it would be done again.
- dheera 11y agoMaybe. But those were the early stages of the language. Python 2 has huge amounts of industrial-scale deployment that many people would prefer not to break. There are also numerous systems in deployment that need to have 2 and 3 running simultaneously on the same machine.
- kbenson 11y ago> There are also numerous systems in deployment that need to have 2 and 3 running simultaneously on the same machine. There were numerous systems that needed both 1 and 2 in the Redhat ecosystem. I agree it likely won't happen again, but mostly because the Linux distros have likely learned their lesson. It's the package managers and Linux distros with included system functionality written in some version of Python which have the ultimate say, and there are much better solutions for the problem now than when Python 2 came out. That said, it's possible some distro will make /usr/bin/python be Python 3 and /usr/bin/python2 be Python 2, if they haven't already. Weirder stuff happens all the time.
- nickysielicki 11y agoUbuntu 16.04 plans for this: https://blueprints.launchpad.net/ubuntu/+spec/foundations-x-python3-only https://blueprints.launchpad.net/ubuntu/+spec/foundations-x-... Arch linux already has.
- kbenson 11y agoI imagine /usr/bin/python will be Python 3 then. The cycle continues.