Most Viewed Content:

Cygnus space cargo spacecraft arrives at International Space Station with only half of its solar array

NASA astronaut Nicole Mann, backed up by NASA astronaut...

Toyota responds to continued production cuts in the next 3 months: easing pressure on dealer earnings

In response to the news that "production will continue...

OpenAI Launched Assistants API, Allowing Developers to Customize AI Assistants with One Click

At today's OpenAI's first developer conference, OpenAI launched the...

Python 3.12 is now available, overall performance is up 5%

Python 3.12 official version has been launched, improving many existing features, including f-string parsing improvements, Buffer Protocol (Buffer Protocol), etc., but also improved the error message, so that developers can be more clear about the reasons for the error, in addition, the development team has also carried out a series of performance improvements, claiming that In addition, the development team has made a number of performance improvements, claiming that “the overall performance of this release has been improved by about 5%.”

▲ Source Python website

In Python 3.12, f-string parsing is said to be more flexible, and many previously disallowed operations are further relaxed in this version.

In 3.11, f-string expressions that reused the same quotes as an external f-string would result in a syntax error, which is now allowed in 3.12; in the previous version, f-string expressions themselves could span multiple lines, but still had to be defined on a single line, whereas in 3.12 developers can use multi-line expressions. Previously, the f-string could not contain any backslash symbols “\”, which are now allowed in the new version, so the f-string can now also contain Escape Sequences.

Python developers in the new version can more easily use Buffer Protocol (Buffer Protocol), which is a lightweight and efficient structured data storage format, when dealing with a large number of data files, the use of related protocols, can improve performance and save storage space.

Python 3.12 introduces a new approach to address the problem of the Buffer Protocol, which has been used primarily in Python’s C API and has not been friendly to Python-only developers, allowing developers to manipulate the functionality more directly in Python, rather than through C or other methods.

Python 3.12 also improves error messages, making it easier to identify the cause of an error and to fix it. When a developer incorrectly uses the import syntax, the correct usage is suggested, and when an instance property is used in a category method that is not referenced correctly, the error message now points to the correct property name in the project itself.

Python 3.12 also features a number of performance improvements. Unicode has been streamlined in this release to make it lighter and less space-intensive, and Python uses the BOLT binary tool to improve performance in scenarios by 1 to 5% when building environments.

Latest

Starting from 48,900, Geely Panda Karting officially starts pre-sale

Geely Panda Karting officially started pre-sale. The pre-sale price...

Ford: Expand charging network, fuel/ hybrid/ pure electric in parallel

Recently, Ford released the company's comprehensive annual report for...

Chery’s two new cars are exposed, targeting overseas markets

Recently, some media exposed the actual cars of two...

New Trumpchi Shadow Leopard to launch on May 1, upgraded performance rims

Recently, we learned from the official that the 2024...

Newsletter

Don't miss

Starting from 48,900, Geely Panda Karting officially starts pre-sale

Geely Panda Karting officially started pre-sale. The pre-sale price...

Ford: Expand charging network, fuel/ hybrid/ pure electric in parallel

Recently, Ford released the company's comprehensive annual report for...

Chery’s two new cars are exposed, targeting overseas markets

Recently, some media exposed the actual cars of two...

New Trumpchi Shadow Leopard to launch on May 1, upgraded performance rims

Recently, we learned from the official that the 2024...

Samsung Galaxy S25 Ultra expected to feature 5000mAh + 45W Combo

Technology media WccFtech recently reported that Samsung will not...
Stephen Cruise
Stephen Cruisehttps://www.techgoing.com
Stephen Cruise is a senior editor covering latest smartphones, EVs, PC gaming, console, and tech with 11 years of experience.

Mercedes-Benz Shifts Focus from Apple CarPlay to Proprietary Car System

Apple announced a new version of CarPlay at WWDC in June 2022, claiming that "CarPlay will no longer be a simple projection of the...

Chery Sterra ET launch on May 9: Starting from NT$239,000 for the pure electric version

According to official Sterra news, the Sterra brand’s second model/first SUV model, the Sterra ET, will be launched on May 9. Positioned as a...

Hyundai, Kia, and Baidu Forge Partnership in Smart Mobility

According to Yonhap News Agency, Hyundai Motor and Kia signed a strategic cooperation framework agreement on intelligent connected vehicles with Baidu in Beijing on...