适合win7的python版本_Python 3.9 发布,不再支持 Win7!
Python 3.9 正式發布
Python 3.9 和之后的版本將不再支持 Windows 7 ,還沒用上 Windows 10 的可以考慮換系統了。
而且這里默認下載的是 64 位,不再是 32 位。
版本亮點
新的語法特性
>>> x = {"key1": "value1 from x", "key2": "value2 from x"}
>>> y = {"key2": "value2 from y", "key3": "value3 from y"}
>>> x | y
{'key1': 'value1 from x', 'key2': 'value2 from y', 'key3': 'value3 from y'}
>>> y | x
{'key2': 'value2 from x', 'key3': 'value3 from y', 'key1': 'value1 from x'}
做類型注解時,可以直接使用內置的集合類型如列表 list 和字典 dict 做泛型類型,而不用像以前一樣要 from typing import List, Dict
def greet_all(names: list[str]) -> None:
for name in names:
print("Hello", name)
任意合法的表達式現在都可以用作裝飾器了
新的內置特性
str.removeprefix(prefix)
str.removesuffix(suffix)
標準庫新增特性:
解釋器改進
相對于原先的 LL(1) 解析器,兩者性能相當,但是 PEG 解析器更加靈活,以后用來設計新的語法一些 Python 內置對象 (range, tuple, set, frozenset, list, dict) 使用了
做了一個簡單的測試:
# python 3.8
>>> timeit('dict()')
0.09337569999999573
>>> timeit('range(10)')
0.15194649999997978
# python 3.9
>>> timeit('dict()')
0.06748100000000079
>>> timeit('range(10)')
0.1062435999999991
差不多有 1/3 的提升,還是比較明顯的。garbage collection does not block on resurrected objects;
a number of Python modules (_abc, _bz2, _codecs, _contextvars, _crypt, _functools, _json, _locale, _weakref) now use multiphase initialization as defined by PEP 489;
a number of standard library modules (_hashlib, _posixsubprocess,
新增標準庫模塊新的
發布流程變化
這項更改加快了發布的節奏,使主要版本可以預計每12個月發布一次,在每年的 10 月
感興趣的小伙伴可以自行下載嘗鮮咯!
總結
以上是生活随笔為你收集整理的适合win7的python版本_Python 3.9 发布,不再支持 Win7!的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: springboot启动太慢优化
- 下一篇: 我对ThreadLocal的理解