Python 3 this decade

I was going to write a video about Andrew Godwin – Taking Django Async, but I decided to write another video about parsing because the video was too informative and still in the process of being downloaded

A share of Python 3 this decade from CPython core developers

Python 3 was released in 2008, and it has been a rough decade. It has also been announced that Python 2.x will cease maintenance in 2020. So in a sense, this year’s PyCon 2018 Topic is a very special sharing

The initial place

The story begins on that unforgettable summer

In 2006, PEP 3000 was formally introduced to address some of the lingering problems in Python 2

  1. Large integer and integer splitting, new class and old class splitting

  2. Division of the realization of the higher level of posture

  3. Unicode/STR is not clear

  4. Relative introduction and absolute introduction

After a lot of hard work by the community, Python 3 was released in 2008

As developers celebrated the release of Python 3 with glee, they didn’t notice that things were changing

Winds in winter will come

The first problem with Python 3 was fragmentation, and the cost of migration for developers was huge. In the share, the developer told a bad joke.

In the early days of Python 3.x and Python 2.x, when compatibility features were not introduced, release fragmentation seemed inevitable to the community

In Python 2.6 and Python 3 at the time, you might have faced some of these problems if you wanted to migrate

As a result, when Python 3 was first released, almost no packages were compatible with it

At the same time, the developers gave two examples of the problems of the time, Django and Twisted

At one point, someone in the community shouted Python 2.8 in order not to get hacked to death!

But as the situation improved, the community began to cry out, 2.8 is not possible, not in this life

Know the spring to

With the gradual iteration and compromise of Python 3, winter is over. First, the developers solved the first big problem: package management

At the same time, the community has come up with some real migration recommendations

At the same time, the corresponding tips are also provided for the case of a large number of historical codes

(Note: Instagram gets a head start on this, see Lisa Guo, Hui Ding Keynote PyCon 2017)

Developers in the community, meanwhile, are working on some iterations of Python 3 to reduce the migration burden

These include, but are not limited to, PEP 414 reintroducing u” and PEP 461 reintroducing b’%’.

The efforts of the community have not been in vain, with the reduction of migration costs and the increase of benefits, the situation of 2/3 secession has been greatly improved

In a survey conducted in 2018, the percentage of packages supporting Python 3 reached 90+%

The community’s migration drive is driven by three factors. On the one hand, Python 3’s performance has improved substantially. The developers cited two examples,

Here’s another one from Instagram:

The second aspect is to fix some potholes left over from Python 2.x in the past

Including and not limited to the random number seeds in Python 2 that are not really random.

On the other hand, Python 3 has introduced many new things to help developers write better code, such as the introduction of new Modules in Python 3

Some of the highlights are ASYNcio (PEP 3156), the Future model (PEP 3148), DataClass (PEP 557), and so on

At the same time, Python 3.x continues to introduce new language features in addition to new Modules

PEP 498 introduced F-strings, PEP 492 introduced async/await, PEP 484 introduced Type Annotation, etc

Finally, the sharer shares the current state of Python 2.

To Be Continued

The decade of Python 2/3 is undoubtedly one of the most significant events in the history of Python and perhaps computing. We’ve seen Python grow, and we’ve seen Python’s predecessors grow. So this has been a big decade for all of us as Python developers.

Whatever the future holds for Python, what Python will look like in the next decade. I hope that each of us will continue to enjoy the joy and accomplishment of writing Python.

Life is simple, We use Python !