注意: 雖然 JavaScript 對於本網站不是必需的,但您與內容的互動將受到限制。請開啟 JavaScript 以獲得完整的體驗。

Python 3.12.0a3

釋出日期: 2022年12月6日

這是 Python 3.12 的早期開發者預覽版.

與 3.11 相比,3.12 系列的主要新功能

Python 3.12 仍在開發中。此版本 3.12.0a3 是七個計劃中的 alpha 版本中的第二個。

Alpha 版本的目的是為了更容易地測試新功能和錯誤修復的當前狀態,並測試釋出過程。

在 alpha 階段,可以在 beta 階段開始之前(2023-05-08)新增功能,如果必要,可以在釋出候選階段之前(2023-07-31)修改或刪除功能。請記住,這是一個預覽版本,建議在生產環境中使用。

Python 3.12 的許多新功能仍在規劃和編寫中。迄今為止,主要的新功能和變化包括:

  • 更進一步改進的錯誤訊息。現在更多可能由拼寫錯誤引起的異常會向用戶提供建議。
  • 支援 Linux `perf` 效能分析器在跟蹤中報告 Python 函式名。
  • 根據 PEP 623,unicode 物件的 C 實現中已棄用的 wstrwstr_length 成員已被移除。
  • unittest 模組中,一些長期棄用的方法和類已被移除。(它們自 Python 3.1 或 3.2 起就已被棄用)。
  • 已移除棄用的 smtpddistutils 模組(參見 PEP 594PEP 632)。setuptools 包(預設安裝在虛擬環境和許多其他地方)繼續提供 distutils 模組。
  • 許多其他舊的、損壞的和已棄用的函式、類和方法已被移除。
  • 字串中無效的反斜槓轉義序列現在會發出 SyntaxWarning 警告,而不是 DeprecationWarning,使其更加顯眼。(它們將來會成為語法錯誤。)
  • (嘿,核心開發者們,如果你們認為重要的功能沒有出現在這個列表中,請告知 Thomas。)

有關 Python 3.12 更改的更多詳細資訊,請參閱Python 3.12 的新特性。Python 3.12 的下一個預釋出版本將是 3.12.0a4,目前計劃於 2023-01-09 釋出。

更多資源

接下來是些完全不一樣的內容

12 月 6 日是聖尼古拉斯節 (Sinterklaas),儘管通常在 12 月 5 日,即聖尼古拉斯節前夜 (Sinterklaasavond) 慶祝。傳統上這是一個匿名贈送禮物的節日,禮物通常附有詩歌。因此,這裡有一首由 GPT-3 生成的聖尼古拉斯節詩歌,以配合今天的釋出:

Sinterklaas is coming to town
To bring gifts to the Python community
Code that's fast and efficient
With syntax that's easy to see

For the beginners, a book on the basics
To guide them through the world of coding
For the experts, a new module to explore
With features that keep their skills honing

Sinterklaas will visit each and every coder
With presents to help them advance
In the world of Python programming
With skills that give them a chance

So let us all welcome Sinterklaas
With open arms and hearts full of cheer
For the gifts he brings to the Python community
Will help us all grow and persevere.

(聖尼古拉斯節的其他傳統習俗包括“驚喜”包裝禮物,即禮物被偽裝成完全不同的東西,以及“Zwarte Piet”(黑彼得),聖尼古拉斯的“助手”,其起源帶有明顯的種族主義色彩。我決定只保留詩歌部分。)

檔案

版本 作業系統 描述 MD5 校驗和 檔案大小 Sigstore GPG
Gzip 壓縮的原始碼包 原始碼釋出版 847fbe8eedda82bbc75d39c881da84be 25.1 MB CRT SIG SIG
XZ 壓縮的原始碼包 原始碼釋出版 199338e6b375c6f70519d3ebbb5c98c3 18.8 MB CRT SIG SIG
macOS 64 位 universal2 安裝程式 macOS 適用於 macOS 10.9 及更高版本 0c20265ccef472b8ad0415d162375808 40.5 MB CRT SIG SIG
Windows 安裝程式 (64位) Windows 推薦 3c8b4f9ac217f421cc5701ba951bbc6e 23.9 MB CRT SIG SIG
Windows 安裝程式 (32位) Windows 82b977b1b21d54a60e00ea69005b07c9 22.8 MB CRT SIG SIG
Windows 安裝程式 (ARM64) Windows 實驗性 ce6c426b05ca59a8e5eb53822e600191 23.1 MB CRT SIG SIG
Windows 可嵌入包 (64位) Windows 6a9113f3fadae3abe3ce6fb2c4d95c8a 9.8 MB CRT SIG SIG
Windows 可嵌入包 (32位) Windows 9bad66343431ed6a5914fa95b3e65c4a 8.8 MB CRT SIG SIG
Windows 可嵌入包 (ARM64) Windows a0724055c99f9cbed35af586f3e4406a 9.0 MB CRT SIG SIG