【发布时间】:2012-07-14 21:07:10
【问题描述】:
所以我在Kotti中找到了这段代码:
[child] = filter(lambda ch: ch.name == path[0], self._children)
我想知道:左边的方括号有什么作用?我在 python shell 中做了一些测试,但我不太清楚它的目的。
额外问题:lambda 返回什么?我猜是(Boolean, self._children) 的元组,但这可能是错误的......
【问题讨论】: