by evnp · 1y ago · 0 comments
If not, I'm now curious why the `None` special case was added to `filter`..
While this doesn't explain why filter accepts None as the lambda, I think the fact that there are no builtin identity function kind of explains why. It's easier to write None rather than put an identity lambda. I reckon it also makes it easier for a compiler to optimize this specific case.