Python Versions

Important (to me) changes by version:

3.11

  • SPEED!

  • tomllib (read-only)

  • PEP 657: Fine-grained error locations in tracebacks

  • PEP 594: Many legacy standard library modules have been deprecated and will be removed in Python 3.13

3.10

  • match pattern matching (which I have not yet looked at)

  • parenthesized context managers (for formatting ease, no semantic difference)

  • Deprecate distutils module.

3.9

  • dict union operator

  • string methods to remove prefixes and suffixes.

  • zoneinfo module

3.8

3.7

  • context vars Context variables are conceptually similar to thread-local variables. Unlike TLS, context variables support asynchronous code correctly.

  • Data classes

3.6

  • asyncio module is no longer provisional

  • f-strings

  • underscores in numeric literals

  • secrets module provide an obvious way to reliably generate cryptographically strong pseudo-random values suitable for managing secrets, such as account authentication, tokens, and similar.

3.5

3.4

3.3

3.2