Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法编码:
def fn(): return None
作为 lambda,在 Python 中?
是的,参数列表可以省略:
fn = lambda: None
从5.12 开始生产。拉姆达斯是:
lambda_form ::= "lambda" [parameter_list]: expression
方括号parameter_list表示可选元素。
parameter_list
你必须这样做: