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 年 5 月 8 日)之前添加,如有必要,可能会在发布候选阶段(2023 年 7 月 31 日)之前进行修改或删除。请记住,这是一个预览版本,不建议在生产环境中使用。
Python 3.12 的许多新功能仍在计划和编写中。迄今为止,主要的新功能和更改包括:
- 更进一步改进的错误消息。现在更多可能由拼写错误引起的异常会向用户提供建议。
- 支持 Linux `perf` 性能分析器在跟踪中报告 Python 函数名。
- 根据 PEP 623,unicode 对象的 C 实现中已弃用的
wstr和wstr_length成员已被移除。 - 在
unittest模块中,一些长期弃用的方法和类已被移除。(它们自 Python 3.1 或 3.2 起就已被弃用)。 - 已移除弃用的
smtpd和distutils模块(参见 PEP 594 和 PEP 632)。setuptools包(默认安装在虚拟环境和许多其他地方)继续提供distutils模块。 - 许多其他旧的、损坏的和已弃用的函数、类和方法已被移除。
- 字符串中无效的反斜杠转义序列现在会发出
SyntaxWarning警告,而不是DeprecationWarning,使其更加显眼。(它们将来会成为语法错误。) - 为准备性能增强,整数的内部表示已发生变化。(这不应影响大多数用户,因为它是一个内部细节,但可能会给 Cython 生成的代码带来问题。)
- (嘿,核心开发者们,如果你们认为重要的功能没有出现在这个列表中,请告知 Thomas。)
有关 Python 3.12 更改的更多详细信息,请参阅Python 3.12 新特性。Python 3.12 的下一个预发布版本将是 3.12.0a6,目前计划于 2023 年 3 月 6 日发布。
更多资源
- 在线文档.
- PEP 693,Python 3.12 发布时间表。
- 通过 GitHub Issues 报告错误。
- 帮助资助 Python 及其社区.
接下来是些完全不一样的内容
出于个人原因,今天我想分享一首关于猫的诗。考虑到当前对人工智能的痴迷,有什么比《星际迷航:下一代》电视剧中机器人 Data 创作的“颂猫歌”(实际上由两位人类 Clay Dale 和 Brannon Braga 所写)更好的 AI 艺术范例呢?
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 校验和 | 文件大小 | Sigstore | GPG | |
|---|---|---|---|---|---|---|---|
| Gzip 压缩的源码包 | 源码发布版 | ea4c722ed34902d2c00eafb9be83b58f | 25.1 MB | CRT | SIG | SIG | |
| XZ 压缩的源码包 | 源码发布版 | 9f638d43a5cc186c42f9eccdaa3fee3f | 18.8 MB | CRT | SIG | SIG | |
| macOS 64 位 universal2 安装程序 | macOS | 适用于 macOS 10.9 及更高版本 | f3b8dc3cc592b3704347f2c971d4b34f | 40.7 MB | CRT | SIG | SIG |
| Windows 安装程序 (64位) | Windows | 推荐 | d3b3b0a59aac9bffdf2c5b9273aa6fd7 | 24.1 MB | CRT | SIG | SIG |
| Windows 安装程序 (32位) | Windows | aafa5e2017f4c21b258f454eb3316f70 | 23.0 MB | CRT | SIG | SIG | |
| Windows 安装程序 (ARM64) | Windows | 实验性 | 3538b9294e2383565013ef09c7879f85 | 23.2 MB | CRT | SIG | SIG |
| Windows 可嵌入包 (64位) | Windows | aea098a992d4367a9d1e33bc6da2d667 | 9.7 MB | CRT | SIG | SIG | |
| Windows 可嵌入包 (32位) | Windows | c522ded5e190bc04b179bb78566d151e | 8.7 MB | CRT | SIG | SIG | |
| Windows 可嵌入包 (ARM64) | Windows | 18364fcd5f2548c9fc6414361f2805ee | 8.9 MB | CRT | SIG | SIG | |
