Python, the most popular programming language today, has reached version 3.10, marking the next major release since the decade-long transition from Python 2.7.
Python 3.10 is the successor to Python 3.9 and has been in the works for over a year as leading Python (CPython) developers continued to work on backward compatibility. CPython is the primary implementation of Python, upon which other data science-driven distributions like Anaconda are built.
“Python 3.10.0 is the last major release of the Python programming language, and it contains many new features and enhancements,” CPython maintainers announced in a blog post.
SEE: Programming languages: Python just took a big step forward
“Structural model mapping has been added in the form of a mapping statement and model case statements with associated actions. Models consist of sequences, mappings, primitive data types as well as Class instances. Pattern matching allows programs to extract information from complex data types, plug into the data structure, and take specific actions based on different forms of data, ”the project explains in the notes from version 3.10.
“Although structural pattern matching can be used in its simplest form to compare a variable to a literal in a case statement, its real value to Python lies in its handling of the subject type and form,” adds. he does.
Major Python contributors presented the update in a meeting this week. Pablo Galindo Salgado, physicist and lead contributor to Python, explained how the project uses Microsoft’s GitHub Actions DevOps (CI / CD) tools to test Python changes on Windows, Linux, and macOS systems.
“When you merge something with Python, there is a CI in GitHub Actions and we have other providers although we mainly use GitHub Actions now. It tests your commits on every commit on Linux, Windows and macOS,” said Salgado.
“We know that Python works on more platforms, things like FreeBSD, PowerPC and other architectures instead of Intel, like Arm chips or [Apple’s] M1. There are a lot of different architectures, ”he says.
“So once the commit lands in the master branch, there are a lot of machines called ‘bulletin boards’ that test commits… some of which test CPython in normal mode.”
“There are also display panels testing in special configurations such as checking invalid memory addresses using Clang and GCC sanitizers or competition conditions, which break all the time because these checks are not executed on each comment because they normally take hours. “
SEE: Developers wanted: companies are hiring and these are the skills they are looking for
The group also noted that PEP 563 was supposed to arrive but was postponed after a debate at the 2020 Python Language Summit in April. The problem was support for the proposal by third-party software libraries and an associated PEP 649.
“It is possible that third-party libraries and users did not plan to respond within the current timeframe because they were unaware of this change in schedule,” wrote the Python Steering Council.
“There isn’t enough time to properly discuss PEP 649 or any of the alternatives before the beta 1 deadline, and we really need to make sure that we don’t make the errors worse here. long-term solution, which is not possible while meeting the Python 3.10 release timelines, which means we are defering PEP 649 to Python 3.11 as well.
SEE: Another reason developers give up: to escape your bad code
Language creator Guido van Rossum assures us that the switch to Python 4.0 – if and when it does happen – won’t be as traumatic as the decade-long switch from Python 2 to Python 3.
“If ever there is a version 4, the passage from 3 to 4 will look more like that from 1 to 2 rather than 2 to 3”, he noted last year, adding that “we still have 2-3 PTSD”.
Van Rossum announced Python 3 13 years ago, but the project did not stop supporting Python 2 until last April due to the amount of legacy code that would have been broken by upgrading to 3. Today , he is employed as a Distinguished Engineer at Microsoft where he works to improve the performance of the language, which currently limits it to high-end hardware and prevents it from accessing mobile devices and browsers.