News for hackers. Stuff that matters.
Re:Functools – The Power of Higher-Order Functions in Python by matsemann on Friday July 09, 2021 @05:52AM (#27782060)
> All the "for x in blah" can seem like a lot of boilerplate for a non-Pythonista

It's not the boilerplate that's the problem, it's that using the same construct for everything doesn't convey its intention.

If I see a chain of filter, map, group etc., I instantly know what each part does. I know that filter does a filtering, and then I can look at the function passed to it do know how exactly it's filtering. If I see a list comprehension, I have to first understand if it's filtering or mapping or whatever (or even all at once), before I can grok it.

There are no comments on this comment yet.