Python Will be Dead in 2021?

A review of the final version of Python 3.9

Python is one of the most popular and progressing programming languages. Based on TIOBE, a software quality company stated that Python is an aggressive programming language. In 2020, Python is on top 2, replacing Java. But, number one is still C. It was an impressive achievement for Python in the last 20 years.

Why is Python unstoppable? First, Python is working well for machine learning and deep learning. We can realize it from Google developing simple machine learning or deep learning for people via Google Colaboratory (hereafter: Google Colab). People can run their machine learning or deep learning code in the machine provided by Google Colab. Google Colab holds Jupyter Project to build the Jupyter Notebook environment in Google Colab. If you are interested in running your machine learning or deep learning code in Google Colab, you can visit this link.

Second, Python is growing in the Internet of Things (IoT). According to the Eclipse Foundation’s 2018 IoT Developer Survey, Python is on the top 4 programming language for IoT. If we review the TIOBE index, I believe that Python will overcome the other languages. StackOverFlow reinforces it in 2019 that said, Python is on top 4 of the most popular programming, scripting, and markup language. It was magnificent progress for Python because, in 2017, Python overtook PHP and C# became a victim in 2018. Python is the fastest-growing programming language.

Third, Python is the best programming language to start your data science journey. Python is open-source, so that many people are developing it for many topics, from scientists to data analyst in a company. They build various Python libraries, such as Vaex, that can read 1 million rows and PyMC3 to explore N-dimensions parameters in the Bayesian inference paradigm.

Then, will Python dead in 2021? According to Wikipedia, Python is first released in 1991 by Guido van Rossum. Now, Python is 29-year old. Klingenberg and his colleagues in 1995 found that the typical lifespan of a python in captivity ranges from 20 to 30 years. If Python is mimicking python, so Python will be dead in 2021. But, I believe that Python will not die in 2021 because the fact says that it is unstoppable. Maybe, in 2021, we will meet a new version of Python, Python4.

In October 4th 2020, Python.org released a final version of Python 3.9.0. Some of the new syntax are

01. PEP584, a union operators added to dict. With this PEP, you can merge and update dictionaries. Here is the example to merge and update dictionaries.

x = {"dict1": "x1", "dict2": "x2"}
y = {"dict2": "y1", "dict3": "y2"}
# merge dict
x | y

The result is

{'dict1': 'x1', 'dict2': 'y1', 'dict3': 'y2'}

You can update the dict using (|=). Here is the example

x = {"dict1": "x1", "dict2": "x2"}
y = {"dict2": "y1", "dict3": "y2"}
# update dict x
x |= y

If you print x, the result is

{'dict1': 'x1', 'dict2': 'y1', 'dict3': 'y2'}

02. PEP 585, type hinting generics in standard collections. Using this PEP, you can use built-in collection types (list and dict) as generic types rather to correspond capitalized types (e.g. List or Dict) from typing.

03. PEP 614, relaxed grammar restrictions on decorators. With this PEP, you can use any valid expression as a decorator.

04. PEP 615. You can use the system’s time zone data provided by zoneinfo. To use it, you can read this code.

If you print variable dt, you will get a result like this

2020-10-31 12:00:00-07:00

The result tells you the year, month, and date. After that, you will get the time with GMT-7 for the Los Angeles location. It is beneficial for you to work with a specified date and time, for example, astronomers. Astronomers need this parameter to track the ‘wanderer’ celestial bodies like planets in Solar System, asteroids, comets, etc.

05. PEP 616, string methods to remove prefixes and suffixes. You can remove prefixes and suffixes using this PEP. Here is the example

string = 'Hello World'# remove prefix
string.removeprefix('Hello')

The result is

' World'

Here is the example to remove suffixes

string = 'Hello World'# remove prefix
string.removesuffix('World')

You will get this result

'Hello '

I can not wait for breakthroughs in Python development in the future. If you want to contribute to Python, you can become a member or volunteer in Python Software Foundation.

That’s all. Thanks for reading my story. If you want to get a notification when I post a new story, you can follow my account.

References

  1. TIOBE Index for November 2020. Python is unstoppable and surpasses Java. https://www.tiobe.com/tiobe-index/
  2. Google Colaboratory. https://colab.research.google.com/
  3. KDnuggets. 2020. A complete guide to Google Colab for Deep Learning — KDnuggets. https://www.kdnuggets.com/2020/06/google-colab-deep-learning.html
  4. Eclipse Foundation’s IoT Developer Survey. 2018. https://www.slideshare.net/kartben/iot-developer-survey-2018?ref=https://blog.benjamin-cabe.com/2018/04/17/key-trends-iot-developer-survey-2018
  5. Wikipedia. Python Programming Language. https://en.wikipedia.org/wiki/Python_(programming_language)
  6. Klingenberg R, Vosjoli P, Barker D, Barker T: The Ball Python Manual. Mission Viejo, CA, Bowtie, 1995.
  7. What’s new in Python. https://docs.python.org/3/whatsnew/

Written by

Python Programmer || Data Scientist || Bayesian Astronomer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store