Python 3.11 May 2026
import tomllib with open("config.toml", "rb") as f: config = tomllib.load(f) print(config["tool"]["poetry"]["name"])
# Python 3.10 Traceback (most recent call last): File "calc.py", line 2, in <module> result = 100 / (50 - 50) ZeroDivisionError: division by zero Traceback (most recent call last): File "calc.py", line 2, in <module> result = 100 / (50 - 50) ~~~~^~~~~~~~~~~~ ZeroDivisionError: division by zero python 3.11
Python 3.11 fixes this. When an error occurs, the interpreter now points an arrow ( ^ ) at the specific expression that failed, not just the line number. import tomllib with open("config
ExceptionGroup and except* .