Python 3.7.0 版本正式发布,新特性来袭

Python 3.7.0版本已经于美国时间2018年6月27日发布,同时发布的也有Python 3.6.6版本,下面是来自Python官网的通知:
我们代表Python开发社区和Python 3.7版本发布团队,很高兴地宣布推出Python 3.7.0。 Python 3.7.0是Python的最新功能版本,它包含许多新功能和优化特性。你可以在这里找到Python 3.7.0:
https://www.python.org/downloads/release/python-370/
Python的第三方库应该尽快支持3.7.0版本。
有关3.7系列中包含的功能的更多信息,请参阅Python 3.7新增功能。有关在3.7.0中所作更改的详细信息可以在其更改日志中找到。我们将于2018年7月开始定期维护3.7系列版本。
我们希望你喜欢Python 3.7!
附:我们也很高兴地宣布Python3.6系列的新版本Python 3.6.6也正式推出:
https://www.python.org/downloads/release/python-366/
感谢所有帮助开发Python和发布这些版本的志愿者!请考虑通过自愿或通过组织对Python软件基金会的贡献来支持我们的努力。
Python 3.7.0 包含许多新特性和优化,亮点包括:
1、新语法特性:
PEP 563, 推迟评估类型注释
2、向后不兼容语法更改:
async 和 await 现在保留关键字
3、新的库模块:
contextvars: PEP 567 – Context Variables
dataclasses: PEP 557 – Data Classes
importlib.resources
4、新的内置功能:
PEP 553, 新的 breakpoint() 函数
5、数据模型改进:
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.
6、标准库重要改进:
asyncio模块性能和可用性改进
time 模块支持 nanosecond resolution
7、CPython 实现改进:
避免使用 ASCII 作为默认文本编码:
PEP 538, legacy C locale coercion
PEP 540, forced UTF-8 runtime mode
PEP 552, deterministic .pycs
新的 development runtime mode
PEP 565, 改进 DeprecationWarning 处理
8、C API 改进:
PEP 539, 用于 thread-local 存储的新的 C API
9、文档改进:
PEP 545,Python 文档翻译
新增文档翻译:日语、法语和韩语
Python学习交流群:865597862 加群获取十套PDF 文档 欢迎大家加入!