Python 3.8.0 正式发布,主要更新内容介绍
Python 3.8.0 正式發(fā)布了,以下是主要更新內(nèi)容:
PEP 572, 賦值表達(dá)式
PEP 570, 僅位置參數(shù)
PEP 587, Python 初始化配置(改進(jìn)嵌入)
PEP 590, Vectorcall:CPython 的快速調(diào)用協(xié)議
PEP 578, 運(yùn)行時(shí)審核掛鉤
PEP 574, 帶外數(shù)據(jù)的 Pickle 協(xié)議 5
Typing 相關(guān):PEP 591,PEP 586,PEP 589
并行文件系統(tǒng)緩存,用于編譯的字節(jié)碼
調(diào)試版本與發(fā)行版本共享 ABI
f 字符串支持一個(gè)方便的 = 說明符進(jìn)行調(diào)試
continue 現(xiàn)在在 finally: 塊中
在 Windows 上,默認(rèn)的異步事件循環(huán)現(xiàn)在是 ProactorEventLoop
在 macOS 上,默認(rèn)情況下現(xiàn)在在多進(jìn)程中使用 spawn start 方法
現(xiàn)在,多進(jìn)程(multiprocessing)可以使用共享內(nèi)存段
typed_ast 合并回 CPython
LOAD_GLOBAL 現(xiàn)在快了 40%
pickle 現(xiàn)在默認(rèn)使用協(xié)議 4,提高了性能?
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
總結(jié)
以上是生活随笔為你收集整理的Python 3.8.0 正式发布,主要更新内容介绍的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Chrome用户请尽快更新:谷歌发现两个
- 下一篇: JDK/JAVA 13正式版发布,此版本