3 ms·
I can see the value in not using Python's comprehensions because although they provide an easy way to write map and filter, there's no clean, consistent way of
by csandreasen 12y ago
I can see the value in not using Python's comprehensions because although they provide an easy way to write map and filter, there's no clean, consistent way of expressing fold (or reduce or whatever you want to call it) - at least, not without altering state, which flies in the face of what this tutorial is trying to teach. Since those are the big three, I can see the value of writing everything with lambdas in the tutorial just to keep things consistent.
That said, I agree that it would have been helpful to at least give a mention to list/generator comprehensions.