What’s New In Python 3.11.0?

Tom Smykowski
6 min readOct 26, 2022

Just lately I was covering for you Python 3.10.8, and now 3.11.0 is here. A stable release made on 24/10/2022.

Python 3.11.0 is all about better error communication, improved strong typing and performance improvements. Let’s dive into the new features!

Let's start with one every developer will fall in love with in a second. There will be a bonus, if you read to the end!

Precisely Showing What Causes An Error

For a developer it is crucial to know what causes an error. Unfortunately, sometimes all we had was a line number.

Python 3.11.0 introduces a more fine-grained feedback thanks to Pablo Galindo, Batuhan Taskaya and Ammar Askar. As we can read in the PEP (Python Enchantment Proposal):

This PEP proposes adding a mapping from each bytecode instruction to the start and end column offsets of the line that generated them as well as the end line number. This data will be used to improve tracebacks displayed by the CPython interpreter in order to improve the debugging experience.

Below you can see an example of the new, lovely error log:

Concurrent code debugging will become easier too!

--

--

Tom Smykowski

Software Engineer & Tech Editor. Top 2% on StackOverflow, 3mil views on Quora. Won Shattered Pixel Dungeon.