use*_*216 2 python lambda closures anonymous-function
我知道什么是闭包,什么是lambda函数,但我想知道它的名称是什么:
>>> def foo(a, b):
>>> return a + b
>>>
>>> bar = foo
>>> bar(1, 1)
>>> 2
Run Code Online (Sandbox Code Playgroud)
我只是想知道在变量中绑定函数的事实
| 归档时间: |
|
| 查看次数: |
69 次 |
| 最近记录: |