准备升级了....
3.8.0 candidate 2: Monday, 2019-10-07 (if necessary)
3.8.0 final: Monday, 2019-10-14 (assuming a single release candidate)
Features for 3.8 Some of the notable features of Python 3.8 include:
1
alfredsun Oct 8, 2019 即将不能用于完成时
|
2
liuzhaowei55 Oct 8, 2019
哎。。。
|
4
onmyoji Oct 8, 2019
官网不是还是 3.7.4 吗?
|
5
xiri Oct 8, 2019 via Android
要那么新干嘛,还在用 3.6🐶
|
6
Juszoe Oct 8, 2019
哪位总结一下有什么好用的特性
|
7
chenstack Oct 8, 2019
上次看到的 final 日期还是 10.28
|
8
youthfire Oct 8, 2019 via iPhone
3.6 升级到 3.7 的时候感觉性能提升明显,平时用的脚步速度提升了约 15%。这次看看了。
|
9
qlhai Oct 8, 2019 还在用 2.7 的默默路过
|
10
cmdOptionKana Oct 8, 2019 |
11
XIVN1987 Oct 8, 2019 via Android
只有赋值表达式是重大改动吧,,
|
12
deorth Oct 8, 2019
子解释器上了吗
|
13
watsy0007 OP @youthfire 是的... 特性的话, [pep 572]( https://www.zhihu.com/question/274823057) 让 python 之父很恼火...
|
14
watsy0007 OP @deorth multiple interpreters ? 这里提案在 [pep 554]( https://www.python.org/dev/peps/pep-0554/) 我看了下 3.9 版本才会发
|
15
mywaiting Oct 8, 2019
感觉 typing hints 再努力努力,python 就可以考虑分支为动态脚本、静态编译两个实现了
有哪个大牛去提个 PEP ? |
16
watsy0007 OP @cmdOptionKana 标注时间了呀. 下周一可以试试了.
|
20
ipwx Oct 8, 2019
我的看法:3.8 也就更新了这两件值得注意的事情
1、加强了 Type Hinting,增加了 Duck Type Hinting 的支持。 2、assignment operation。 小打小闹而已。 |
29
youthfire Oct 8, 2019
@cat9life 主要看 changelog 里有没有 performance 提升,当然也和脚本具体内容有关,可能正好是作用到那段代码了,因为平时我都带计时,所以很明显。
|
30
love Oct 8, 2019
python 这越来越复杂,传个参都整这么多花样有必要么,JS 这么简单写起来还比 py 舒服
|
33
laike9m Oct 8, 2019
@rogwan 那 Golang 和 C++ 也都在画蛇添足了
这一期我们稍微聊过一下 572,主要的槽点我认为在于语法没有强制限定使用范围: https://www.pythonhunter.org/episodes/5 |
35
love Oct 8, 2019
@XIVN1987 我写 js 也全是用 typescript 啊,觉得不难,js 本质是个简单的语言。哪怕在底层 py 的复杂性都完暴 js,元类什么的我以前研究完就觉得过度设计。
|
36
rogwan Oct 8, 2019 via Android
|
37
Trim21 Oct 8, 2019 via Android
前几天看完了 what's new,感觉不像 3.6 和 3.7 有非常吸引人升级的特性…
|
38
w1573007 Oct 8, 2019 via Android
@cmdOptionKana 疑车无据
|
39
ipwx Oct 8, 2019 via Android
|
40
XIVN1987 Oct 8, 2019 @love
元类是给库、框架开发人员用的,我们不需要深究 正是因为 Python 有这些复杂的语法机制,Python 的用户 API 才能这么易用,, 如果 Python 没有__xxx__那一堆魔法函数,numpy 就不会出现,,没有 numpy 的话 Python 就不可能在数值计算、数据分析、机器学习、深度学习这些领域流行起来 Python 里的 ORM 也依赖元类实现,,不知道 JS 中的 ORM 相比于 Python 中的 ORM 使用起来怎么样,,没有对比过,, |
41
mamahaha Oct 8, 2019 ## Java
> 百度为您找到相关结果约 69,100,000 个 ## python > 百度为您找到相关结果约 38,500,000 个 ## c++ > 百度为您找到相关结果约 59,700,000 个 ## golang > 百度为您找到相关结果约 24,600,000 个 |
42
XIVN1987 Oct 8, 2019
PEP 572 还是能够接受的,,毕竟使用场景比较明确,,
PEP 505 -- None-aware operators 就不能接受了,,还好 Deferred 了,希望不要通过 |
43
XIVN1987 Oct 8, 2019
|
45
lrxiao Oct 8, 2019
LOAD_GLOBAL is now 40% faster
这不算巨大提升吗...调用函数都要 LOAD GLOBAL 的 |
46
BOYPT Oct 8, 2019
(学不动了
|
48
alfredsun Oct 8, 2019
@cmdOptionKana 中文没有时态不代表了不能表完成啊
就举的例子里,“好”和“好了”的区别就是一个是原型一个是表完成啊,你把“好了”封装成名词做句子成分当然就看不出来了。 |
50
woshi88 Oct 9, 2019
弃坑了,始于 2.7 止于 3.6
|
51
prenwang Oct 9, 2019
multiprocessing can now use shared memory segments to avoid pickling costs between processes 这个好
|
54
wuwukai007 Oct 9, 2019
一定要用 3.6+,提升太明显了!
|
55
watsy0007 OP @wuwukai007 https://docs.python.org/3.8/whatsnew/3.8.html#optimizations 看了下优化部分, 还是挺明显的.
Improved performance of operator.itemgetter() by *33%*. Optimized argument handling and added a fast path for the common case of a single non-negative integer index into a tuple (which is the typical use case in the standard library). Sped-up field lookups in `collections.namedtuple()`. They are now more than two times faster, making them the fastest form of instance variable lookup in Python. The list constructor does not overallocate the internal item buffer if the input iterable has a known length (the input implements __len__). This makes the created list *12%* smaller on average. Reduced an overhead of converting arguments passed to many builtin functions and methods. This sped up calling some simple builtin functions and methods up to *20–50%*. LOAD_GLOBAL instruction now uses new “per opcode cache” mechanism. It is about *40%* faster now. |