Mark Tenenholtz

Mark Tenenholtz



Python 3.11 is out! ๐ŸŽ‰ This is one of the most exciting releases in a while, including significant speed upgrades and better error messages. Here's what's new:

1. Faster CPython! Python 3.11 is anywhere between 10-60% faster than Python 3.10, and on average it's 25% faster. This includes faster startup times and more efficient use of/communication with C. Here are the individual operations that are notably faster:

2. Better error messages Anyone who has used a language like Rust knows that Python left something to be desired when it came to error messages. Well, now Python has error messages that highlight the specific location of the problem!

3. Grouped exceptions We now have the introduction of the "except*" clase, which allows you to have more flexible error handling. You can create a group of exceptions that may partial match with multiple of these except* clauses.

4. Added notes on exceptions Sometimes, when you're catching an error, it's helpful to leave an extra note to the user as to exactly *why* the error was raised. Many libraries (like Keras) spend a lot of time trying to enhance this. Well, the .add_note() method now allows this!

5. A bunch of type hint stuff There's now support for a Self type and marking TypedDict items as required or not. But, the most exciting one for me are "variadic generics". Check this one out if you use libraries like NumPy: In english...

The speed upgrade alone is exciting enough. But it's just the first stop on a longer roadmap to make Python faster (and maybe JIT compiled?). There's a master plan out there for Python 3.12 and beyond that has me extremely bullish on Python going forward

If you enjoyed this, follow me @marktenenholtz for more high-signal Python and ML content!

Follow us on Twitter

to be informed of the latest developments and updates!

You can easily use to @tivitikothread bot for create more readable thread!
Donate ๐Ÿ’ฒ

You can keep this app free of charge by supporting ๐Ÿ˜Š

for server charges...