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

Python 3.12.0b2

釋出日期: 2023年6月6日

這是 Python 3.12 的測試版預覽

Python 3.12 仍在開發中。本次釋出,3.12.0b2,是 3.12 四個測試版預覽中的第二個。

Beta 預覽版旨在讓更廣泛的社群有機會測試新功能和錯誤修復,並準備他們的專案以支援新的功能釋出。

我們強烈鼓勵第三方 Python 專案的維護者在測試階段使用 3.12 進行測試,並儘快將發現的問題報告到Python 錯誤跟蹤器。儘管該版本計劃在進入測試階段時功能完整,但仍有可能在釋出候選階段開始之前(2023年7月31日星期一),功能會被修改,甚至在極少數情況下會被刪除。我們的目標是在 beta 4 之後沒有 ABI 更改,並在第一個釋出候選版本 3.12.0rc1 之後儘可能少地進行程式碼更改。為了實現這一目標,在測試階段儘可能多地暴露 3.12 極其重要

請記住,這是一個預覽版本,建議在生產環境中使用。

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

Python 3.12 的一些主要新特性和更改包括:

  • 泛型類的新型別註解語法 (PEP 695)。
  • 更靈活的 f-string 解析,允許以前許多不允許的操作 (PEP 701)。
  • 更進一步改進的錯誤訊息。現在更多可能由拼寫錯誤引起的異常會向用戶提供建議。
  • 許多大大小小的效能改進(例如 PEP 709)。
  • 支援 Linux `perf` 效能分析器在跟蹤中報告 Python 函式名。
  • 根據 PEP 623,unicode 物件的 C 實現中已棄用的 wstrwstr_length 成員已被移除。
  • unittest 模組中,一些長期棄用的方法和類已被移除。(它們自 Python 3.1 或 3.2 起就已被棄用)。
  • 已棄用的 smtpddistutils 模組已被移除(參見 PEP 594PEP 632)。setuptools 包繼續提供 distutils 模組。
  • 許多其他舊的、損壞的和已棄用的函式、類和方法已被移除。
  • 字串中無效的反斜槓轉義序列現在會發出 SyntaxWarning 警告,而不是 DeprecationWarning,使其更加顯眼。(它們將來會成為語法錯誤。)
  • 為準備效能增強,整數的內部表示已發生變化。(這不應影響大多數使用者,因為它是一個內部細節,但可能會給 Cython 生成的程式碼帶來問題。)
  • (嘿,核心開發者們,如果你們認為重要的功能沒有出現在這個列表中,請告知 Thomas。)

有關 Python 3.12 更改的更多詳細資訊,請參閱Python 3.12 中的新特性。Python 3.12 的下一個預釋出版本將是 3.12.0b3,目前計劃於 2023年6月19日釋出。

更多資源

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

I forgot how lush and electrified
it was with you. The shaggy
fragrant zaps continually passing
back and forth, my fingertip
to your clavicle, or your wrist
rubbing mine to share gardenia
oil. We so purred like dragonflies
we kept the mosquitoes away
and the conversation was heavy,
mother-lacerated childhoods
and the sad way we'd both
been both ignored and touched
badly. Knowing that being
fierce and proud and out and
loud was just a bright new way
to be needy. Please listen to me, oh
what a buzz! you're the only one
I can tell. Even with no secret,
I could come close to your ear
with my mouth and that was
ecstasy, too. We barely touched
each other, we didn't have to
speak. The love we made leapt
to life like a cat in the space
between us (if there ever was
space between us), and looked
back at us through fog. Sure,
this was San Francisco, it was
often hard to see. But fog always
burned off, too, so we watched
this creature to see if it knew
what it was doing. It didn't.

同性戀驕傲週末,舊金山,1992,布倫達·肖內西(Brenda Shaughnessy)作。

檔案

版本 作業系統 描述 MD5 校驗和 檔案大小 Sigstore GPG
Gzip 壓縮的原始碼包 原始碼釋出版 f46dd5ad8725d67dd3352a329e040ad9 25.6 MB .sigstore SIG
XZ 壓縮的原始碼包 原始碼釋出版 7631011aa48961f5dc0e72a9117b7937 19.3 MB .sigstore SIG
macOS 64 位 universal2 安裝程式 macOS 適用於 macOS 10.9 及更高版本 d7460b53167b192de91164b0d4c808af 41.9 MB .sigstore SIG
Windows 安裝程式 (64位) Windows 推薦 e8d757375445abdd9db5182d50c74b79 24.5 MB .sigstore SIG
Windows 安裝程式 (32位) Windows 38c1e36758c7c86f367588d0e2643f30 23.3 MB .sigstore SIG
Windows 安裝程式 (ARM64) Windows 實驗性 ae22c9d41357854d46881acabcce877d 23.8 MB .sigstore SIG
Windows 可嵌入包 (64位) Windows 16dc1fe4f552fbd2b96e11d051602a9a 9.9 MB .sigstore SIG
Windows 可嵌入包 (32位) Windows a6533c3be8d1782e3bb2da79fdd5afea 8.9 MB .sigstore SIG
Windows 可嵌入包 (ARM64) Windows 8c1a8b8d784c06c648dea2648e7a1a42 9.3 MB .sigstore SIG