Analysis / Interviews / News / Technology

New Python 3.6 Release Addresses a Growing User Base

8 Jan 2017 10:10pm, by

The coding community got a nice bonus gift under our collective Christmas tree on December 23, 2016, when the Python Software Foundation released the latest version of the language, Python 3.6.

While the rest of us were busy snagging cocktail snacks at the office holiday party, Continuum Analytics maker of Anaconda, the leading open source data science platform for the Python programming language — was busy issuing their own matching release. Anaconda packages the Python core with a full stack of integrated software tools for package and operations management, data exploration and visualization, and other essentials. The open-source platform is, according to Continuum, “free for forever, for anyone, for any use” — at least for single users on single systems. The enterprise version scales to team or organization-wide implementation.

Ian Stokes-Rees is a computational scientist and engineer at Continuum Analytics. He’s also been a Python user for fifteen years and is involved in the strategic planning and development of the Anaconda platform.

We talked to Stokes-Rees about features and improvements that Python 3.6 brings to the ecosystem, and why this is very well may be the most significant Python update ever.

The Big Green Button

So, is Python 3.6 one of those shaking-out-a-few-wrinkles releases, or more along the lines of a seismic shift?

Seismic, yeah. Not because there are huge changes in the language itself but because of timing. Python 3.6 is the first release that’s happened after the period in 2016 of a significant industry and community shift in adoption of Python 3 over Python 2. So it’s not something that 3.6 did so much as something that happened between September 2015, when the previous Python 3.5 version was released, and the end of 2016. Back then, the practical state of the nation was we recommended people learn Python 2 first. So many implementations were still back on Python 2.7, and the early versions before 3.4 were a little ropy.

By the time 3.5 rolled out, though, things were solid and users were starting to migrate. At the same time, in just the 15 months since that release, we are seeing a surge of people coming to Python for the first time, as their language of choice. And it’s only natural that they start with the most recent version. So 2016 was the year that Python 3 downloads began to lead Python 2 download numbers. By the end of the year, my guess is that two out of three will be going straight to 3.6.

Between those two factors, Python really seems to be gaining a great deal of momentum: At the end of 2015, we had seen 3 million lifetime Anaconda downloads. At 2016 end, that number was 11 million.

What would users get under the hood, Python-wise, if they downloaded Anaconda today?

When people click the big green download button, the default they’re going to get is Python 3.6. And that is new with this release. Previously we had wanted make the right decision for commercial adoption, and until 2016 that version was 2.7.

What does that signify for moving users from the 2.x to 3.x code base?

I see this happening more or less organically.

Up until last year, people needed to be encouraged to migrate. In 2016 there was a tipping point where there were so many new adopters of the Python language that they started with Python 3 at the outset. This is greenfield growth, people with no pre-existing commitment to Python.

As for the core Python community, by 3.4-5 they had learned the patterns of how to shift. It took time for them to learn how to write Python 3 code, understand the benefits it offered and port over Python 2. By now people know the patterns and techniques to port Python 2 code or provide dual language support between 2 and 3.

Python 2.7 was released in such a way that Python 3 code can still run in a 2.7 environment. So we aren’t writing all our code twice — we are still very strongly supporting 2.7. But we are writing our new code so it can still be used both ways.

There is another coincidental force multiplier surrounding Python 3.6, too, you say?

Timing-ish events that will propel adoption: 3.6 is going to run better on Windows than ever. Microsoft had made available previously very expensive compilers that many developers did not have access to. It had been hard to get high quality compiled libraries for the language, until now.

Since Anaconda pre-compiles for Windows, Mac and Linux, out of the box you now get not only these libraries but also 200 carefully selected, pre-compiled and optimized tools and libraries.

Not a Footnote for Computer Science Geeks

So timing-wise, also culturally, it sounds like Python 3.6’s release is especially significant. What actual, hands-on improvements or changes are users going to see, though?

Compared to the previous version, 3.6 has fundamental improvements in terms of core data structures. Hashmap, in Python it’s called the dictionary, is the fundamental data structure inside the language. Python is built around the dictionary and heavily utilized by Python programmers. One of the headline features in the release announcement is a reduction in memory use by at least 20 percent. That is significant. It’s not a footnote for CS geeks — fundamental because the Python language is bootstrapped in C, but implemented in Python, so functionality builds on core Python data structures. When the core data structure in the language has 20 percent less memory consumption that is a big deal.

These are important because Python is built on dictionaries and they are perhaps the most widely used data structure. This work was led by Python core developer Raymond Hettinger (unaffiliated with Continuum). He is a real leader in the community and has made huge contributions to the progress of the language. He has major name recognition in the Python world and is an amazing speaker who packs out rooms at events.

Other improvements include enhanced annotations. It’s a dynamically typed language, so typed annotations provide the ability to do some syntax checking. It’s not moving toward being a strongly typed language, just providing these hints to help software devs reduce bugs and better leverage and understand the behavior of their code in terms of the APIs and so on.

Santa’s Got a Brand New Dynamically Typed Language Bag

Why would Python be a good choice as a first programming language?

Python is flexible and performant. Elegant and easy to learn. Powerful, with a rich set of pre-existing tools and libraries. JavaScript is good for web development, but Python for just about any other task, small to large. It scales with you, goes with you. Python is syntactically efficient, easy to read and write everything from simple starting programming tasks to complex application suites. It is a modern, high-performance cross-platform language.

I would say also, though, because it’s not just a great language with great libraries and set of tools, but also with a great open community of people behind it. There are all kinds of meetup groups, regional conferences and events, open source developers and analysts and engineers all engaged in all kinds of community forums.

What’s your own personal favorite aspect of the new release?

For me, the addition of the type annotations is huge. Taking Python to the next level of being a high quality, robust language people can develop in — without having to introduce a strict, strongly-typed language system — is fabulous and I’m really excited about the opportunities this presents.

Feature image via Pixabay.


A digest of the week’s most important stories & analyses.

View / Add Comments