New in Python 3.8.0

Python 3.8.0

发布时间: Oct. 14, 2019

这是一个Python3.8.0的稳定发行版。
Python3.8.0是最新的Python编程语言发行版,ta包含了许多新的特征和优化。

This is the stable release of Python 3.8.0
Python 3.8.0 is the newest major release of the Python programming language, and it contains many new features and optimizations.

与3.7版本对照,3.8的主要新特征:
PEP 572 赋值表达式
PEP 570 仅根据位置的参数
PEP 587 Python 初始化设置(改善嵌入)
PEP 590 Vectorcall 一个CPython 快速调用协议
PEP 578 运行时审计钩子
PEP 574 Pickle协议 5 带OOB数据
用于编译字节码的并行文件系统缓存
Debug版本和Release版本共享ABI
f-strings支持=进行调试
continue现在在finally:块中是合法的

Major new features of the 3.8 series, compared to 3.7
PEP 572 , Assignment expressions
PEP 570, Positional-only arguments
PEP 587, Python Initialization Configuration (improved embedding)
PEP 590, Vectorcall: a fast calling protocol for CPython
PEP 578, Runtime audit hooks
PEP 574, Pickle protocol 5 with out-of-band data
Typing-related: PEP 591 (Final qualifier), PEP 586 (Literal types), and PEP 589 (TypedDict)
Parallel filesystem cache for compiled bytecode
Debug builds share ABI as release builds
f-strings support a handy = specifier for debugging
continue is now legal in finally: blocks
on Windows, the default asyncio event loop is now ProactorEventLoop
on macOS, the spawn start method is now used by default in multiprocessing
multiprocessing can now use shared memory segments to avoid pickling costs between processes
typed_ast is merged back to CPython
LOAD_GLOBAL is now 40% faster
pickle now uses Protocol 4 by default, improving performance

猜你喜欢

转载自www.cnblogs.com/passguan/p/11683258.html