|Python 2 Versus Python 3 Revisited|
|Written by Janet Swift|
|Monday, 16 February 2015|
Results are available for the second annual Python 2.x versus 3.x usage survey. Python 3 does seem to be gaining ground, but perhaps too slowly for comfort.
Python has become a very popular language. Last week we reported that it was way ahead of all others on CodeEval, a coding challenge website. In its language rankings CodeEval doesn't distinguish between Python versions but a look at the leadersboards reveals that Python 2 crops up frequently - a situation that some see as deplorable.
Python 3 was released in 2008 but was backwards incompatible and therefore encountered a lot of resistance to adoption. It took 5 years, until April 2013, for new downloads of Python 3 to exceed those of Python 2. Although the latest version on the Python 2 branch, Python 2.7 is the last ever, there is still at least one more maintenance release in the pipeline. Python 2.7 is going to be available until at least 2020 to cater for those who can't, or won't migrate to Python 3, which is a cause for much consternation in the Python community.
Last year a survey was conducted that went straight to the heart of the Python version debate and asked the question Was Python 3 A Mistake? Twelve months on the survey has been re-run, this time with 6746 respondents, up from 4790 last year.
Over the year there had been a 10% shift towards Python 3 as shown in this graph from Randy Olsen, who answered Bruno Cauet's request for more attractive charts when he first posted the survey results.
Even so, when it comes to starting a personal project 53% choose Python 2.x compared to 47% for Python 3.x. and Python 2.7 is clearly the most popular of all the versions that are in ise:
In the 2013 survey 23% of respondents thought Python 3 had been a mistake and 77% thought it had not. For the follow up a third option was included and over half of those completing the survey selected it. While this reduced the size of the "No" camp, the percentage thinking Python 3 was a mistake had been halved, down to 12%.
The survey also sheds light on why users cling to the older branch of Python:
Dependencies are cited by 59% of respondents, but is this justified? Randy Olsen points to the Python 3 Readiness site, which indicates that over 80% of the most popular Python packages now have Python 3 support. In turn it utilizes a tool created by Brett Cannon called caniusepython3 that tells you which packages do and don't support it.
So while it probably was a mistake to introduce Python 3 without backward compatibility, it is an issue that is almost a thing of the past and it is probably time to move forward.
Python 2.x vs 3.x usage survey, 2014 edition
2013-2014 Python 2.x-3.x survey.pdf
Python 3.3 Overtakes 2.7 - Time To Switch?
Python 2.7 To Be Maintained Until 2020
Python 3.4 Is Now Available With New Features
Python In Easy Steps (book review)
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
or email your comment to: email@example.com
|Last Updated ( Sunday, 15 February 2015 )|