注意: 虽然 JavaScript 对于本网站不是必需的,但您与内容的交互将受到限制。请开启 JavaScript 以获得完整体验。

Python 3.12.0a5

发布日期: 2023 年 2 月 7 日

这是 Python 3.12 的早期开发者预览版.

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

Python 3.12 仍在开发中。此版本 3.12.0a5 是计划的七个 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 632setuptools 包(默认安装在 virtualenvs 和许多其他位置)继续提供 distutils 模块。
  • 许多其他旧的、损坏的和已弃用的函数、类和方法已被删除。
  • 字符串中无效的反斜杠转义序列现在会发出 SyntaxWarning 而不是 DeprecationWarning,使其更加可见。(它们将来会成为语法错误。)
  • 为了提高性能,整数的内部表示已更改。(这不应影响大多数用户,因为它是一个内部细节,但可能会给 Cython 生成的代码带来问题。)
  • (嘿,各位核心开发者,如果此列表中缺少您认为重要的功能,请 告知 Thomas。)

有关 Python 3.12 更改的更多详细信息,请参阅 Python 3.12 中的新增功能。Python 3.12 的下一个预发布版本将是 3.12.0a6,目前计划于 2023-03-06 发布。

更多资源

现在来点完全不同的东西

出于个人原因,我今天想包含一首关于猫的诗,考虑到目前人们对人工智能的迷恋,有什么比《Ode to Spot》这首由电视剧《星际迷航:下一代》中的机器人 Data 作的诗更好的 AI 艺术例子呢(实际上是由 Clay Dale 和 Brannon Braga 这两个人类写的)。

Felis catus is your taxonomic nomenclature,
An endothermic quadruped, carnivorous by nature;
Your visual, olfactory, and auditory senses
Contribute to your hunting skills and natural defenses.

I find myself intrigued by your subvocal oscillations,
A singular development of cat communications
That obviates your basic hedonistic predilection
For a rhythmic stroking of your fur to demonstrate affection.

A tail is quite essential for your acrobatic talents;
You would not be so agile if you lacked its counterbalance.
And when not being utilized to aid in locomotion,
It often serves to illustrate the state of your emotion.

O Spot, the complex levels of behavior you display
Connote a fairly well-developed cognitive array.
And though you are not sentient, Spot, and do not comprehend,
I nonetheless consider you a true and valued friend.

文件

版本 操作系统 描述 MD5 校验和 文件大小 GPG Sigstore
Gzip 压缩的源代码 tarball 源代码发布 ea4c722ed34902d2c00eafb9be83b58f 25.1 MB SIG CRT SIG
XZ 压缩的源代码 tarball 源代码发布 9f638d43a5cc186c42f9eccdaa3fee3f 18.8 MB SIG CRT SIG
macOS 64 位 universal2 安装程序 macOS 适用于 macOS 10.9 及更高版本 f3b8dc3cc592b3704347f2c971d4b34f 40.7 MB SIG CRT SIG
Windows 安装程序(64 位) Windows 推荐 d3b3b0a59aac9bffdf2c5b9273aa6fd7 24.1 MB SIG CRT SIG
Windows 安装程序(32 位) Windows aafa5e2017f4c21b258f454eb3316f70 23.0 MB SIG CRT SIG
Windows 安装程序 (ARM64) Windows 实验性 3538b9294e2383565013ef09c7879f85 23.2 MB SIG CRT SIG
Windows 可嵌入软件包(64 位) Windows aea098a992d4367a9d1e33bc6da2d667 9.7 MB SIG CRT SIG
Windows 可嵌入软件包(32 位) Windows c522ded5e190bc04b179bb78566d151e 8.7 MB SIG CRT SIG
Windows 可嵌入软件包 (ARM64) Windows 18364fcd5f2548c9fc6414361f2805ee 8.9 MB SIG CRT SIG