Python 官网于 6 月 27 日发布 v3.7.0 的更新说明。v3.7.0 是最近比较大的更新。此次发布包含了诸多新特性和优化。
官网对新特性和优化的汇总:
新语法特性:
PEP 563, postponed evaluation of type annotations.
向后不兼容的语法更改:
async 和 await 现在是保留关键字
新的库模块:
contextvars: PEP 567 – Context Variables
dataclasses: PEP 557 – Data Classes
importlib.resources
新的 built-in 特性:
PEP 553, 新函数 breakpoint()
Python 数据模型改进:
PEP 562, customization of access to module attributes.(访问模块属性,可以定制了)
PEP 560, core support for typing module and generic types.
the insertion-order preservation nature of dict objects has been declared to be an official part of the Python language spec.
标准库中的重要改进:
The asyncio module has received new features, significant usability and performance improvements. (asyncio 模块已经获得了新功能,显着的可用性和性能改进。)
The time module gained support for functions with nanosecond resolution. (time 模块获得了对纳秒级分辨率功能的支持)
CPython 实现的改进:
Avoiding the use of ASCII as a default text encoding: 取消 ASCII 作为默认文本编码
PEP 538, legacy C locale coercion
PEP 540, forced UTF-8 runtime mode
PEP 552, deterministic .pycs
the new development runtime mode
PEP 565, improved DeprecationWarning handling
C API 改进:
PEP 539, new C API for thread-local storage
文档改进:
Python 官方文档的翻译,新增日文版、法语版和韩语版;
其他详情,请参阅 Python 官网说明:
https://docs.python.org/3.7/whatsnew/3.7.html
Please see What’s New In Python 3.7 for more information.
More resources
Windows users
The binaries for AMD64 will also work on processors that implement the Intel 64 architecture. (Also known as the "x64" architecture, and formerly known as both "EM64T" and "x86-64".)
There are now "web-based" installers for Windows platforms; the installer will download the needed software components at installation time.
There are redistributable zip files containing the Windows builds, making it easy to redistribute Python as part of another software package. Please see the documentation regarding Embedded Distribution for more information.
macOS users
For 3.7.0, we provide two binary installer options for download. The default variant is 64-bit-only and works on macOS 10.9 (Mavericks) and later systems. We also continue to provide a 64-bit/32-bit variant that works on all versions of macOS from 10.6 (Snow Leopard) on. Both variants now come with batteries-included versions oF Tcl/Tk 8.6 for users of IDLE and other tkinter-based GUI applications; third-party and system versions of Tcl/Tk are no longer used. Consider using the new 10.9 64-bit-only installer variant, unless you are building Python applications that also need to work on older macOS systems.
Both python.org installer variants include private copies of OpenSSL 1.1.0. Please carefully read the Important Information displayed during installation for information about SSL/TLS certificate validation and the Install Certificates.command.
Files
Version
Operating System
Description
MD5 Sum
File Size
GPG
Source release
41b6595deb4147a1ed517a7d9a580271
22745726
Source release
eb8c2a6b1447d50813c02714af4681f3
16922100
Mac OS X
for Mac OS X 10.6 and later
ca3eb84092d0ff6d02e42f63a734338e
34274481
Mac OS X
for OS X 10.9 and later
ae0717a02efea3b0eb34aadc680dc498
27651276
Windows
46562af86c2049dd0cc7680348180dca
8547689
Windows
for AMD64/EM64T/x64
cb8b4f0d979a36258f73ed541def10a5
6946082
Windows
for AMD64/EM64T/x64
531c3fc821ce0a4107b6d2c6a129be3e
26262280
Windows
for AMD64/EM64T/x64
3cfdaf4c8d3b0475aaec12ba402d04d2
1327160
Windows
ed9a1c028c1e99f5323b9c20723d7d6f
6395982
Windows
ebb6444c284c1447e902e87381afeff0
25506832
Windows
779c4085464eb3ee5b1a4fffd0eabca4
1298280
完整内容请访问->原文