Updated: Sun Apr 14 14:30:09 UTC 2024


Python’s Next Big Leap: What You Need to Know About the Spectacular Update

Articles |

Image Details :

The developers at Python’s core have just released the next major version of the language.

After a decade-long shift from Python 2.7, the most popular programming language of today has achieved version 3.10. 

Everything You Need To Know About Python’s New Version

Python, renowned as a powerhouse among programming languages, is no stranger to evolution. With a thriving community and countless applications across diverse fields, it’s no surprise that excitement is in the air as a major update arrives. The anticipation surrounding Python’s latest transformation is palpable, promising to elevate coding experiences to unprecedented heights. In the fast-paced realm of technology, staying current with programming language updates is a strategic imperative. As Python enthusiasts and developers brace themselves for the unveiling of this significant update, the importance of adaptation becomes evident—keeping skills sharp and creations aligned with the cutting-edge is the key to staying ahead in the digital landscape.

This week, Python was officially recognised by Tiobe, the compiler of a language popularity index, as the most popular programming language, surpassing Java, C, and JavaScript for the first time in 20 years. Python’s popularity stems from its accessibility and the fact that it is supported by a sizable community of third-party software libraries that extend the language’s capabilities in artificial intelligence.   

After more than a year of development focused on maintaining compatibility with earlier versions of Python, version 3.10 is ready to replace Python 3.9. CPython is the foundation of Python distributions like Anaconda, which is designed specifically for data science. 

“Python 3.10.0 is the newest major release of the Python programming language, and it contains many new features and optimisations,” the CPython developers wrote in a blog post. 

Dozens of changes, called Python Enhancement Proposals (PEPs), have been added to the upgrade. In Python 3.10, “structural pattern matching” is one of the most notable new features; it’s a method for dealing with data that’s also present in C, Java, JavaScript, Scala, and Elixir. 

Match statements and case statements of patterns with related actions have been added to facilitate structural pattern matching. There are many different kinds of patterns, such as sequences, mappings, primitive data types, and class instances. According to the release notes for version 3.10, “pattern matching allows programs to extract information from complex data types, branch on the structure of data, and apply specific actions based on different forms of data.”  

“While structural pattern matching can be used in its simplest form to compare a variable to a literal in a case statement, its true value for Python lies in its handling of the subject’s type and shape,” it continues. 

This week, in a meeting, Python core contributors presented the latest changes. The team is leveraging Microsoft’s GitHub Actions DevOps (CI/CD) tools to test Python updates on Windows, Linux, and macOS, as detailed by Pablo Galindo Salgado, a physicist and core Python developer. 

Currently, we are mostly using GitHub Actions; however, we do have other providers that offer CI for when you merge to Python. According to Salgado, “it tests your commits on every commit on Linux, Windows, and macOS. 

Python, as we know, runs on a wider variety of hardware than just Intel, with support for FreeBSD, PowerPC, and other non-Intel architectures like Arm processors and [Apple’s] M1. He claims that “many architectures” exist. 

“There are many machines known as billboards that test commits once they have been merged into the master branch,” the author explains. Some of which are conducting CPython’s “normal” testing.

Those checks are not done on every comment because they generally take hours, so “there are also billboards testing in special configurations,” such as verifying invalid memory locations using Clang and GCC sanitizers or race situations, which constantly fail.

The group also mentioned that PEP 563 was supposed to come in April 2020 but was delayed due to a dispute at the 2020 Python Language Summit. The proposal’s acceptance by external software libraries and PEP 649 were in question.

The Python Steering Council noted that “it’s possible that third-party libraries and users did not plan to react in the current time frame as they were not aware of this change in timing.” 

We need to avoid making things worse here because there isn’t enough time to have a serious conversation about PEP 649 or any of the alternatives before the beta 1 deadline.  Finding a long-term fix is essential; however, it can’t be done without delaying the Python 3.10 release. This also means that PEP 649 will not be implemented until Python 3.11.

The transition to Python 4.0, whenever that may be, is not expected to be as disruptive as the decade-long transition from Python 2 code to Python 3. This is according to the language’s founder, Guido van Rossum. 

Last year, he noted, “we’ve still got PTSD from 2 to 3,” so it’s safe to assume that “if there ever is a version 4, the transition from 3 to 4 will be more like that from 1 to 2 rather than 2 to 3.” 

Since upgrading from Python 2 would have broken so much existing code, Van Rossum didn’t announce Python 3 until 13 years later, in April of this year. Now he works as a distinguished engineer for Microsoft to enhance the performance of the language, which now restricts it to high-end hardware and prohibits it from being used by mobile devices and browsers.  

Leave a comment

Your email address will not be published. Required fields are marked *

Related Posts