AIM logo Black

What to Expect in Python 3.11

Python 3.11 is nearly 10~60% faster than Python 3.10 and measured at a 1.25x speedup on the standard benchmark suite.

Share

Listen to this story

In a blog post today, the new features of Python 3.11 were announced. These features are expected to result in smoother user experience and provide higher performance in comparison to the 3.10 version of the programming language. 

Python 3.11 is nearly 10~60% faster than Python 3.10 and measured at a 1.25x speedup on the standard benchmark suite. 

The new syntax feature includes Exception Groups and except*, with built-in features of enriching exceptions with notes. New standard library modules such as tomllib would support Parsing TOML in the standard library. 

The 3.11 version consists of Interpreter improvements, which includes fine grained error locations in tracebacks along with a new -P command line option. To add more, the PYTHONSAFEPATH environment variable can be used to disable—automatically prepending a potentially unsafe path (the working dir or script directory) to sys.path. 

Here is an example of enhanced error locations in tracebacks:

When printing tracebacks, the interpreter will point to the exact expression that caused the error instead of just the line. 

Older versions of the interpreter would point to just the line making it ambiguous which object was None. These enhanced errors are useful while dealing with deeply nested dictionary objects and multiple function calls, as well as complex arithmetic expressions. 

Variadic generics is a new typing feature, along with marking individual TypedDict items as required. Others include self type, Arbitrary literal string type, and Data Class Transforms. 

It also includes Important removals, deprecations, or restrictions such as removing dead batteries from the standard library or Py_UNICODE encoder APIs. It would also convert macros to functions in the Python C API.


To know more, click here.

Share
Picture of Bhuvana Kamath

Bhuvana Kamath

I am fascinated by technology and AI’s implementation in today’s dynamic world. Being a technophile, I am keen on exploring the ever-evolving trends around applied science and innovation.
Related Posts

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

Upcoming Large format Conference

May 30 and 31, 2024 | 📍 Bangalore, India

Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

AI Forum for India

Our Discord Community for AI Ecosystem, In collaboration with NVIDIA. 

Flagship Events

Rising 2024 | DE&I in Tech Summit

April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore

MachineCon GCC Summit 2024

June 28 2024 | 📍Bangalore, India

MachineCon USA 2024

26 July 2024 | 583 Park Avenue, New York

Cypher India 2024

September 25-27, 2024 | 📍Bangalore, India

Cypher USA 2024

Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA

Data Engineering Summit 2024

May 30 and 31, 2024 | 📍 Bangalore, India