News for hackers. Stuff that matters.
Re:The fate of reduce() in Python 3000 (2005) by pseudalopex on Tuesday January 01, 2019 @10:31PM (#18803988)
The list comprehension syntax is just set notation with Python keywords instead of symbols. Haskell, JavaScript, and Julia have similar syntax. It's also similar to the equivalent loop.

Which of these is clearer?

    [x * y for x in S if P(x) > 0]
    map(lambda x: x * y, filter(lambda x: P(x) > 0, S))

There are no comments on this comment yet.