Python year in review 2016

- by just another Python lover

From moving to GitHub to the release of Python 3.6.0, 2016 has been an interesting year for the Python programming language. We had some uplifting moments like K Lars John’s keynote at Pycon and some downers like Zed Shaw’s article “The case against Python 3”. It was a good year for static typing, asynchronous programming and we finally got the long awaited f-strings. Here’s how I saw it all happening in the last 12 months.

December, 2015

Python’s year started with a bang with the language getting more traction than ever. Particularly, in December 2015, the keyword “Learn Python” overtook “Learn Java” for the very first time. Python maintained this lead throughout this year and it is ending 2016 as the clear winner. This is certainly great news for all of us.

January 2016

New year’s day was dramatic with Brett Cannon announcing in the Python core workflow mailing list that Python’s repository will be moving to GitHub. This caused a bit of a controversy as the open source GitLab was also under consideration. Brett Cannon defended his decision in more detail in one of his blog posts citing familiarity with the GitHub platform and Guido’s input as the major driving forces behind the decision . Guido later announced in Pycon that the move will happen by the end of this year, even though this doesn’t seem to be the case so far.

One of the biggest defining events this year was the American elections. We have all heard the president elect’s campaign slogan “Make America great again”. In a funny twist to the campaign, a computer science major at Rice University created a Python derived language called TrumpScript with the slogan “Make Python great again”. The features of this language deviate from Python in ways that Mr. Trump would personally approve. For example:

  • There are no import statements allowed. All code has to be home-grown and American made.
  • If the running computer is from China, TrumpScript will not compile. We don’t want them stealing our American technological secrets.
  • By constructing a wall (providing the — Wall flag), TrumpScript will refuse to run on machines with Mexican locales

For more such gag reels, check out their awesome repository on GitHub, which has more than 5000 stars now.

February 2016

The discovery of the gravitational wave was one of the landmark science discoveries in 2016. The experiment detected waves coming from a black hole merger 1 billion year ago, confirming Einstein’s prediction.

Python has always been a favorite among the scientific community. The team of scientists involved in the discovery used Python extensively. Most notably, the discovery plots that appear in the groundbreaking paper are made in matplotlib, a Python library for plotting. For a complete discussion of Python’s role in this discovery, see this blog post.

April 2016

As all of you know, Python 3 came out in 2008 and was intentionally backwards incompatible with Python 2. While this move made the language better, more modern and future ready, it has also created major headaches in the past 8 years. Many major libraries had to be ported and the porting process is still going on.

As if to rub salt into the wound, in a mail to the Python development mailing list, Victor Stinner announced that the next major version of Python will be Python 8 and it will break backwards compatibility again! But it was soon discovered that it was April first and the mail was nothing more than a sadistic April Fool’s prank. We all had a good laugh.

Since we are on the issue of Python 2 and 3, it is worthwhile mentioning that many operating systems had not adopted Python 3 at that time. This is one of the major reasons which was blocking Python 3 adoption in the community. In April, the new LTS of Ubuntu, codenamed Xenial Xerus, came out and it included Python 3 as the default Python distribution, answering many of our prayers.

May, 2016

The debate between Python 2 and 3 is never ending, but the PSF had declared that Python 2.7 will reach end of life in 2020. As if to bolster this decision, a website called went online in May. The website is counting down to the end of life of Python 2.7. The website recommends Pycon 2020 as the venue for this major event and talks about an epic after party celebrating Python 2’s contributions to the Python community.

Meanwhile in Pycon 2016, K Lars John gave an amazing keynote which received a standing ovation from the attendees. In this keynote, he talks about fractal dimensions and how it can be related to software development. It would do the keynote no justice to describe it in words. You should absolutely totally irrespective-of-what-you-are-doing-ly see it (be prepared to listen to some music too).

Since we cannot have a Python year in review without Guido prominently featuring in it, here is his Pycon 2016 speech, where he talks about his childhood and how he came up with the Python programming language. Must watch!

Followed by one of his famous tweets this year about a crossword puzzle that expected the solver to know the origin of the name Python.

June, 2016

Python 3.5.2 was released in June. From what I understand, this is just a bugfix release with no major additional features.

August, 2016

PyPy is a fast and alternative implementation of the Python programming language. Lots of programmers who need speed in their code use PyPy instead of CPython as the compiler. One of the biggest pain points about using PyPy was that it had no Python 3 support so far. But in August, Mozilla decided to award $200,000 to Baroque Software to work on PyPy as part of its Mozilla Open Source Support (MOSS) initiative. Within the next year, this money will be used to to pay four core PyPy developers half-time to work on the missing features and on some of the big performance and cpyext issues. This should speed up the progress of catching up with Python 3.x significantly.

October, 2016

Static type checking, like the one shown below, was available in Python since a long time. However, static types in Python was still not widely adopted, because the tool for checking the type annotations, mypy, was not ready for production use… until recently. In October, the Zulip team announced that they are now the largest open source project that has 100 % coverage of static type checking in their code. That is certainly no mean feat and I believe that many larger projects are going to follow in their footsteps.

November, 2016

I always think of November as the month of controversy. Zed Shaw, who wrote a very popular book called Learn Python the Hard Way, wrote a blog post titled “The case against Python 3”. In this post, he claimed that Python 3 is a dead language and no beginner should learn it. This caused a stir in the community. Many people felt compelled to write rebuttals. Most of his claims have been invalidated since then. But here is a list of rebuttals, in case you want to judge for yourself.

With perfect timing, Semaphore CI also published a study of Python versions used in commercial projects in November. This study showed that nearly 70 % code in production runs on Python 2.7. I find this a bit disappointing for Python 3 even though the reasons for this trend are actually well shown.

  1. In many cases, it does not make business sense to spend time and money to port code to Python 3.
  2. In a few isolated cases, a company is still waiting for a dependency to be ported to Python 3.

In any case, this statistics alone is not worrisome since the packages in PyPI are showing the exact opposite trend, something that I have talked about recently.

December, 2016

December was the month we have all been waiting for. Just days before Christmas, Python 3.6.0 was released with major new features.

We now have f-strings, underscores in numeric literals, syntax for variable annotations, asynchronous generators and asynchronous comprehensions. You can see the full list of changes here.

Among them, my favorite is f-strings, which allows me to sign off like this.

new_year = 2017
print("I wish Python an exciting year ahead")
print(f”I wish you a happy new year {new_year} too, dear reader!”)

If you enjoyed this article, please recommend it using the ❤ button so that other people can also discover it.