Python 3.14 有什麼新功能

編輯者:

Adam Turner 和 Hugo van Kemenade

本文介紹了 Python 3.14 與 3.13 相比多了哪些新功能。Python 3.14 已於 2025 年 10 月 7 日發布。完整詳情請見 changelog

也參考

PEP 745 - Python 3.14 發佈時程

發布重點摘要

Python 3.14 是 Python 程式語言的最新穩定版本,包含了語言、實作和標準函式庫的各種變更。最大的變更包括模板字串字面值延遲型別註解的求值,以及標準函式庫中對子直譯器的支援。

The library changes include significantly improved capabilities for introspection in asyncio, support for Zstandard via a new compression.zstd module, syntax highlighting in the REPL, as well as the usual deprecations and removals, and improvements in user-friendliness and correctness.

This article doesn't attempt to provide a complete specification of all new features, but instead gives a convenient overview. For full details refer to the documentation, such as the Library Reference and Language Reference. To understand the complete implementation and design rationale for a change, refer to the PEP for a particular new feature; but note that PEPs usually are not kept up-to-date once a feature has been fully implemented. See Porting to Python 3.14 for guidance on upgrading from earlier versions of Python.


直譯器的改進:

標準函式庫中的顯著改進

C API 改進:

平台支援: