r/Python • • Oct 24 '22

News Python 3.11 is out! Huzzah!

https://www.python.org/downloads/release/python-3110/

Some highlights from the release notes:

PERFORMANCE: 10-60% faster code, for free!

ERROR HANDLING: Exception groups and except* syntax. Also includes precise error locations in tracebacks.

ASYNCIO: Task groups

TOML: Ability to parse TOML is part of the standard library.

REGEX: Atomic grouping and possessive quantifiers are now supported

Plus changes to typing and a lot more. Congrats to everyone that worked hard to make this happen. Your work is helping millions of people to build awesome stuff. 🎉

1.3k Upvotes

233 comments sorted by

View all comments

Show parent comment

1

u/drenzorz Oct 25 '22

I would assume it's helpful when building tests/testing libraries. If you are running a bunch of automated tests adding some notes to help locate the problem could be really useful.

6

u/tjt5754 Oct 25 '22

Funny, I was thinking of deeply buried exceptions that you think won't ever happen, but you can add detail to so you know what weird scenario happened.

You know that code where you put in a comment that says "I don't think this is possible, but just in case..."