Programming Languages: This major update to Python has just arrived

0

Python, the most popular programming language today, has reached version 3.10 and marks the next major release since the decade-long transition from Python 2.7.

Tiobe, the compiler of a Language Popularity Index, crowned Python as the most popular programming language this week, placing it ahead of Java, C and JavaScript for the first time in 20 years. The appeal of Python, a 30 year old language, is that it’s easy to learn, popular for machine learning, and backed by a large ecosystem of third-party software libraries that make it more useful to artificial intelligence, like Google’s TensorFlow and Facebook’s PyTorch.

Python 3.10 follows Python 3.9 and has been in the works for over a year while the core Python developers (CPython) continue to work on backward compatibility. CPython is the core implementation of Python on which other distributions such as the data science-focused Anaconda are built.

“Python 3.10.0 is the latest major version of the Python programming language and contains many new features and optimizations.” CPython maintainer announced in a blog post.

See also: Programming Languages: Python has just made a huge leap forward.

The upgrade includes dozens of additions known as Python Enhancement Proposals (PEPs). One of the headline features is “Structural Pattern Matching” in Python 3.10 – a data handling technique already available in C, Java, JavaScript, Scala and Elixir.

“The structural pattern comparison was added in the form of a match statement and case statement of patterns with associated actions. Patterns consist of sequences, mappings, primitive data types and class instances. Pattern matching enables programs to extract information from complex data types, branch into the data structure and apply specific actions based on different data forms “, the project is explained in the notes to version 3.10.

“While structural matchmaking in its simplest form can be used to compare a variable to a literal in a case statement, its real value to Python lies in handling the type and shape of the subject,” he adds.

Python core employees presented the update in a Meet this week. Pablo Galindo Salgado, physicist and Core Python contributor, 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’s a CI in GitHub Actions, and we have other vendors, although we mostly use GitHub Actions now. It tests your commits every single commit on Linux, Windows, and macOS,” Salgado said.

“We know that Python works on more platforms like FreeBSD, PowerPC and other architectures instead of Intel like Arm chips or [Apple’s] M1. There are many different architectures, ”he says.

“Once the commit lands in the master branch, there are many machines called ‘billboards’ that test commits … some of which test CPython in normal mode.”

“There are also billboard tests in special configurations such as checking for invalid memory addresses with clang and GCC Disinfectants or racing conditions that keep breaking because these checks are not done on every comment as they usually take hours. “

See also: Developers wanted: Companies are hiring and looking for these skills.

The group also noted that PEP 563 should arrive, but after a debate on the Python Language Summit 2020 In April. It was about the support of the proposal by third-party software libraries and an associated PEP 649.

“It is possible that libraries and third-party users did not plan to respond in the current timeframe because they were unaware of this change over time.” the Python Steering Council wrote.

“We don’t have enough time to properly discuss PEP 649 or any of the alternatives before the Beta 1 deadline, and we really need to make sure we’re not making bugs worse here. We need to look for a long-term solution that “is not possible as long as the Python 3.10 release deadlines are met. That means we are moving PEP 649 to Python 3.11 as well. “

See also: Another reason developers quit: To escape your bad code.

The creator of the language, Guido van Rossum, assures that the switch to Python 4.0 – if and when it happens – will not be as traumatic as the decades-long switch from Python 2 code to Python 3.

“If there is ever a version 4, the transition from 3 to 4 will be from 1 to 2 rather than from 2 to 3.” he recorded last year, adding that “we still have PTSD from 2 to 3.”

Van Rossum announced Python 3 13 years ago, but the project didn’t stop supporting Python 2 until last April because switching to 3 would have damaged the old code. Today he is employed as a respected engineer at Microsoft, where he works to improve speech performance that is currently limited to high-end hardware and keeps mobile devices and browsers away.



Source link

Leave A Reply

Your email address will not be published.