Closed william-song-shy closed 5 years ago
其实就是把lambda
变成def
这样支持成块的函数(可能没啥用)
It's a breaking change. You'd better not to do so.
这是一个突破性的变化。你最好不要这样做。
why?
我删了空行
@william-song-shy Here is still a review left. PTAL.
您能说中文吗?
我在第 24 行的改动上还有一个 review。你这个改动打破了现有的 API 行为。
所以呢?
好的,我改成这样可以吧。 @moesoha
@william-song-shy 为什么要放弃第二个参数
看下新的吧(保持了lambda
+第二个参数,对于使用def
的只有一个参数)
@william-song-shy 对于 lamda 保留参数也不影响的话,就不要做这个不必要的判断。
大佬觉得该怎样? @laosb
这里返回函数是用于像斐波那契这种递归定义的数列,所以返回的是 __get_one
。就算是想传 def
定义的函数也是需要用的啊
我的想法
def f (x)
return f(x-1)+f(x-2)
__get_one
有针对重复计算进行处理
就当我只加了一句异常和一个工具
@william-song-shy 判断lambda基本不需要,以及你把缩进都改了,还有code style也不一致
@william-song-shy 算了我来改吧
函数规格
@lin714093880