So I found this code inside Kotti:
[child] = filter(lambda ch: ch.name == path[0], self._children)
And I was wondering: What do the left-hand square brackets do? I did some testing in a python shell, but I can't quite figure out the purpose of it.
Bonus question: What does the lambda
return? I would guess a tuple of (Boolean, self._children)
, but that's probably wrong...