7 ms·
I write things in Python 2. No mac comes with Python 3 installed. So, if I want to distribute simple scripts, I can either send a file and say "run this", or I
by CJefferson 9y ago
I write things in Python 2.
No mac comes with Python 3 installed. So, if I want to distribute simple scripts, I can either send a file and say "run this", or I can give a long list of instructions to install Python 3. Similarly, many linux distributions still don't, or only very recently, started distributing Python 3.
I don't know of any place which would have Python 3 and not Python 2.
So, the question is, why should I switch to Python 3? Python 2 is everywhere, Python 3 is not, and as far as I'm concerned I don't care about the differences.
- dijit 9y agoOnly running things that are installed by default is an odd concept. Sure, it's an extra step and you have a "similar enough" language sitting in the base OS. But I never stick to vi because vim isn't installed and I don't stick to sh because bash isn't installed etc; Sometimes the improvements are worth-while. But the need for "upgrade" is not arbitrary, I wouldn't claim that you need to upgrade to maintain support for instance, since dropping support for 2.x is seemingly arbitrary in isolation. I would instead claim that the features in python3 (and some of the backwards fixes like UTF8 everywhere) are incredibly desirable.. Static method decorators, improvements to string formatting along with, of course, asyncio and other goodies like ordered dictionaries and key-word only arguments.. There's a lot going on there and most of it is good stuff but it's impossible to backport because 2.x is architecturally broken and required a breaking upgrade. In answer of your question; I have python3 installed on all servers. SaltStack supports it so even on Windows we use Python3. http://whypy3.com http://whypy3.com
- CJefferson 9y agoInstalling python 3 on my machine is easy. Now if I distribute a piece of software to 10,000 users, I need to explain to all of them how to install Python 3. That is much more painful.
- x1798DE 9y agoDon't people generally just use some sort of package manager to distribute scripts and their dependencies? I don't use Mac so maybe they're way behind the curve in this.
- CJefferson 9y agoMost Linux package managers need root, so that doesn't help if I need to help a random user of a machine.
- spapas82 9y agoWell, as I write in the article, Django 2.0 was a turning point to me. I was always using Python 2.7.x and was really happy with it but, since Djano 2.0 does not support python 2.x anymore I have been forced to move to Python 3.x in order to be able to write Django 2.0 apps. Yes I know that Django 1.11 (which works with Python 2.7.x) will be supported until 2020 but, out of principle, I don't want tostart a new project with the previous Django version. Upgrading my old Django projects to 2.7.x is another (rather painful) story of course ...