10/2/23

Title: Update on Python 3.12: What's New?

On October 2, 2023, a major update was released for Python 3.12.0, which contains many new features and optimizations. Let's take a look at the main changes.


New Features:

  1. More flexible f-string parsing, allowing many things previously disallowed (PEP 701).
  2. Support for the buffer protocol in Python code (PEP 688).
  3. A new debugging/profiling API (PEP 669).
  4. Support for isolated subinterpreters with separate Global Interpreter Locks (PEP 684).
  5. Even more improved error messages. More exceptions potentially caused by typos now make suggestions to the user.
  6. Support for the Linux perf profiler to report Python function names in traces.
  7. Many large and small performance improvements (like PEP 709 and support for the BOLT binary optimizer), delivering an estimated 5% overall performance improvement.