python3哪个版本兼容性最好-Python 3.7.0 版本正式发布,看看有哪些新特性

源码时代讯,美国时间2018年6月27日,Python 3.7.0版本发布,同时发布的也有Python 3.6.6版本。其中,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 文档翻译

新增文档翻译:日语、法语和韩语

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值