Python 3.13
Python 3.13

Python 3.13

Python 3.13. is the newest major release of the Python programming language, and it contains many new features and optimizations compared to Python 3.12. (Compared to the last release candidate, 3.13.0rc3, 3.13.0 contains two small bug fixes and some documentation and testing changes.)Python 3.13, compared to 3.12. Python 3.13 was released on October 7, 2024


Major new features and changes in Python 3.13 are:

  • Interactive Interpreter: A new interactive shell now includes multi-line editing, history browsing, color-enabled prompts and tracebacks, and easier command access with shortcuts like F1 for help and F3 for "paste mode." This upgrade improves the developer experience in the REPL (Read-Eval-Print Loop)(
  • Improved Error Messages: Python 3.13 enhances the clarity of error messages. For example, if you mistakenly name your script after a standard library module, Python now suggests a fix by renaming the script to avoid conflicts. It also gives better suggestions for incorrect keyword arguments(
  • Filesystem and Pathlib Enhancements: The behavior of the ** (globstar) pattern used in file path searching now matches both files and directories recursively, fixing inconsistencies from earlier versions. The glob.translate() function can also convert glob patterns to regular expressions, offering more flexibility(
  • Platform and Module Changes: Python now officially supports Android and wasm32-wasi, but drops support for wasm32-emscripten. Several outdated standard library modules have been removed, such as cgi, telnetlib, and mailcap(


New features

Typing

Removals and new deprecations

  • PEP 594 (Removing dead batteries from the standard library) scheduled removals of many deprecated modules: aifc, audioop, chunk, cgi, cgitb, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib, lib2to3.
  • Many other removals of deprecated classes, functions and methods in various standard library modules.
  • C API removals and deprecations. (Some removals present in alpha 1 were reverted in alpha 2, as the removals were deemed too disruptive at this time.)
  • New deprecations, most of which are scheduled for removal from Python 3.15 or 3.16.


credit goes to: https://www.python.org/downloads/release/python-3130/


要查看或添加评论,请登录

社区洞察

其他会员也浏览了