Python Will be Dead in 2023?

A review of the final version of Python 3.12

Rizky Maulana Nurhidayat
4 min readNov 10, 2020

--

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 32 years. If Python is mimicking python, so Python will be dead in the end of 2023. But, I believe that Python will not die in 2023 because the fact says that it is unstoppable. Maybe, in 2023, we will meet a new version of Python, Python4.

In July 8th 2023, Python.org released a final version of Python 3.12. Some of the new syntax are

New Grammar Features:

  • PEP701: Syntactic formalization of f-strings

It is impossible to use the quote character delimiting the f-string within the expression portion:

>>>f'Magic wand: { bag['wand'] }'
^
SyntaxError: invalid syntax

A previously considered way around it would lead to escape sequences in executed code and is prohibited in f-strings:

>>>f'Magic wand { bag[\'wand\'] } string'
SyntaxError: f-string expression portion cannot include a backslash

Comments are forbidden even in multi-line f-strings:

>>> f'''A complex trick: {
... bag['bag'] # recursive bags!
... }'''
SyntaxError: f-string expression part cannot include '#'

New typing features:

  • PEP692: Using TypedDict for more precise **kwargs typing

This PEP specifies a more precise way of typing **kwargs by relying on typed dictionaries:

from typing import TypedDict, Unpack

class Movie(TypedDict):
name: str
year: int

def foo(**kwargs: Unpack[Movie]): ...
  • PEP 695: Type Parameter Syntax

PEP 695 introduces a new, more compact and explicit way to create generic classes and functions:

def max[T](args: Iterable[T]) -> T:
...

class list[T]:
def __getitem__(self, index: int, /) -> T:
...

def append(self, element: T) -> None:
...p

In addition, the PEP introduces a new way to declare type aliases using the type statement, which creates an instance of TypeAliasType:

type Point = tuple[float, float]

Type aliases can also be generic:

type Point[T] = tuple[T, T]

Important deprecations, removals or restrictions:

  • PEP 623: Remove wstr from Unicode
  • PEP 632: Remove the distutils package

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/

--

--

Rizky Maulana Nurhidayat

Python Programmer | Prompt Engineer | Data Scientist | Astrophysicist | 401K+ views